Thursday 11 May 2017

Recycler ELE

We often use the RecyclerView and the RecyclerView.Adapter for our material design apps. Going from the ListView to RecyclerView, I really missed the setEmptyView() method.

So, I extended the original RecyclerView Adapter to help manage different states in the application. The Adapter, apart from the standard list, supports three different views:

  • Loading View (While Data is being fetched)
  • Empty View (When there is not data)
  • Error View (In case of an error while fetching data)

Android Arsenal

from The Android Arsenal

No comments:

Post a Comment