Search in sources :

Example 1 with BlogAdapter

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

the class BindingUtils method addBlogItems.

@BindingAdapter({ "adapter" })
public static void addBlogItems(RecyclerView recyclerView, List<BlogResponse.Blog> blogs) {
    BlogAdapter adapter = (BlogAdapter) recyclerView.getAdapter();
    if (adapter != null) {
        adapter.clearItems();
        adapter.addItems(blogs);
    }
}
Also used : BlogAdapter(com.mindorks.framework.mvvm.ui.feed.blogs.BlogAdapter) BindingAdapter(android.databinding.BindingAdapter)

Aggregations

BindingAdapter (android.databinding.BindingAdapter)1 BlogAdapter (com.mindorks.framework.mvvm.ui.feed.blogs.BlogAdapter)1