Search in sources :

Example 1 with OpenSourceAdapter

use of com.mindorks.framework.mvvm.ui.feed.opensource.OpenSourceAdapter in project android-mvvm-architecture by MindorksOpenSource.

the class BindingUtils method addOpenSourceItems.

@BindingAdapter({ "adapter" })
public static void addOpenSourceItems(RecyclerView recyclerView, List<OpenSourceItemViewModel> openSourceItems) {
    OpenSourceAdapter adapter = (OpenSourceAdapter) recyclerView.getAdapter();
    if (adapter != null) {
        adapter.clearItems();
        adapter.addItems(openSourceItems);
    }
}
Also used : OpenSourceAdapter(com.mindorks.framework.mvvm.ui.feed.opensource.OpenSourceAdapter) BindingAdapter(android.databinding.BindingAdapter)

Aggregations

BindingAdapter (android.databinding.BindingAdapter)1 OpenSourceAdapter (com.mindorks.framework.mvvm.ui.feed.opensource.OpenSourceAdapter)1