mirror of
https://github.com/oasisfeng/deagle.git
synced 2025-01-09 04:10:03 +08:00
UPDATE: Remove binding attribute "layout_manager" of RecyclerView, since the automatic binding attribute "layoutManager" is sufficient.
This commit is contained in:
parent
cd20f631c1
commit
31d5757c9e
@ -13,11 +13,6 @@ import android.support.v7.widget.RecyclerView;
|
||||
@SuppressWarnings("unused")
|
||||
public class RecyclerViewBindingAdapter {
|
||||
|
||||
@BindingAdapter("layout_manager")
|
||||
public static <T> void setItemsAndBinder(final RecyclerView recycler_view, final RecyclerView.LayoutManager manager) {
|
||||
recycler_view.setLayoutManager(manager);
|
||||
}
|
||||
|
||||
@BindingAdapter({"items", "item_binder", "item_layout_selector"})
|
||||
public static <T> void setItemsAndBinder(final RecyclerView recycler_view, final ObservableList<T> items, final ItemBinder<T> binder, final LayoutSelector<T> layout_selector) {
|
||||
recycler_view.setAdapter(new BindingRecyclerViewAdapter<>(items, binder, layout_selector));
|
||||
|
Loading…
Reference in New Issue
Block a user