UniversalRecyclerView is a lightweight RecyclerView(advanced and flexible version of ListView) with pulling to refresh, pagination ,shimmer and progresbbar loading style and many other features.You can use it just like RecyclerView. Good thing is, it's in androidX.
Notice that UniversalRecyclerView is a project under development.
- Swipe to refresh.
- Load More.
- Loading styles includes Progressbar & Shimmer. You can also choose None. :)
- "No Data Layout" if your list is empty.
- Provided customization of Text-Color, Text-Size in "No data Layout".
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.pt147:UniversalRecyclerView:1.0.8'
}
<com.parth.universal_recyclerview.UniversalRecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/recycler_view"
app:showNoData="true"
app:noDataText="No Data Found."
app:loadingStyle="Progressbar"/>
showProgress-- For displaying progressdefault:trueloadingStyle-- For displaying various progress type ex. shimmer, progressBar, None.default:ProgressbarshowNoData-- For displaying "No data layout"default:falsenoDataText-- For displaying "No data layout" textdefault:No Record founds!noDataTextColor-- For displaying "No data layout" text colordefault:#000000noDataTextSize-- For displaying "No data layout" text size.default:16spenableSwipeToRefresh-- For include "Pull to refresh layout".default:falsepagination-- For include pagination.default:false
set app:pagination:true in your xml and in your Kotlin class.
your_view.setOnPagination(object : Pagination {
override fun OnLoadMore() {
//Call This method once your data is populated in your list.
recycler_view.loadComplete()
//Call this method when there is no more data in pagination.
recycler_view.noMoreDataInPagination()
}
})set app:enableSwipeToRefresh="true" in your xml and in your Kotlin class.
recycler_view.setOnPullToRefresh(object : PullToRefresh {
override fun onPageRefresh() {
//Call This method once your data is populated in your list.
recycler_view.loadComplete()
}
})