anvil-ui / anvil-ui/anvil

The XML layout sample for android on readme is right?

Đang mở
#85 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
1.4k
Fork
89
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

First I translate the kotlin code on readme sample

``` java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gif_list);
bindingViews();
}

private void bindingViews() {
xml(R.layout.activity_gif_list, () -> {
withId(R.id.loading, () -> {
visibility(progressVisibility);
});
});
}
```

and how I make it works

``` java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gif_list);
bindingViews();
}

private void bindingViews() {
Anvil.mount(findViewById(R.id.activity_gif_list), () -> {
withId(R.id.loading, () -> {
visibility(progressVisibility);
});
});
}
```

I can fix it on readme if you approve...

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.