A powerful Android custom views library designed to simplify common UI patterns like loading states, empty states, pagination, swipe-to-refresh, and more — all with minimal setup and full customization.
✅ Plug-and-play custom views
✅ Loading and Empty states handling
✅ Built-in Swipe-to-Refresh support
✅ Pagination / Load More support
✅ Customizable attributes
✅ Designed for easy extension (more views coming soon...)
- XRecyclerView — Enhanced RecyclerView with:
- Loading / Empty view support
- Swipe refresh
- Auto load more
- Optional dividers
🛠 More views will be added soon (e.g., XScrollView, XButton...)
allprojects {
repositories {
maven { setUrl("https://jitpack.io") }
}
}
dependencies {
implementation("com.github.Special-N9NE:XSuperViews:v1.0")
}
👉 Check for the latest version on JitPack
<org.nine.xsuperviews.XRecyclerView
android:id="@+id/xRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:emptyText="No data available"
app:hasDivider="true"
app:swipeRefreshEnabled="true"
app:swipeRefreshColor="@color/colorPrimary"/>
xRecyclerView.setLayoutManager(LinearLayoutManager(this))
xRecyclerView.setAdapter(yourAdapter)
// Show loading state
xRecyclerView.setLoading(true)
// Optional: Set custom empty view
xRecyclerView.setCustomEmptyView(customEmptyView)
// Optional: Set custom loading view
xRecyclerView.setLoadingView(customLoadingView)
// Load more listener
xRecyclerView.setNextLoadListener {
// Fetch next page data here
}
Attribute | Description | Default |
---|---|---|
app:emptyText |
Text displayed in empty state | "No data provided" |
app:hasDivider |
Show item dividers | false |
app:swipeRefreshEnabled |
Enables pull-to-refresh. If disabled, a ProgressBar or the customLoadingView will be displayed. | false |
app:swipeRefreshColor |
Swipe refresh indicator color | - |
✅ XRecyclerView
— DONE
🚧 XButton
— Coming Soon
🚧 XScrollView
— Coming Soon
🚀 More customizable views in progress...
Feel free to fork, improve, or suggest new views!
👉 Open an Issue
👉 Create a Pull Request
Made with ❤️ by Special-N9NE
⭐ If you like this library, don’t forget to star the repo!