Dev
Recycler
View
Adapter
Adapter for RecyclerView
Author
Jimly A.
Since
31-May-20.
Parameters
action when item clicked
action when item clicked for long, nullable
object data to be implemented
Constructors
instance of DevRecyclerViewAdapter
Types
Functions
Method to add data if not exist, and update if it exist
Method to add or update list of items to list data
Method to add or update list of items to start of list data
Method to add a single item to the start of list data
Method to add list of item to start of list data
Method to finish load more, and remove callback.. Define it in empty state observer
Method to define how many item displayed in RecyclerView
Method to get LayoutInflater
Method to get loadMoreListener
Method to hide loading in recyclerview
Method to declare View Holder, if you use more than one ViewType, declare desired View Holder based on ViewType in this method
Method to reset state and adding loadMore listener
Method to set listener for recyclerView Call this method after assigning loadMoreListener
After inherit Activity or Fragment with onLoadMoreListener, call this method first to set listener
Method to show error textView Define it in error state observer
Show loadMore Layout, call it in observer loadMore