Tired of creating 100s of Adapters and View Models. This Library will make it easy, No need to create a Adapter, ViewHolder for every list
Using Resource Pattern to find the status of the list and show view types according to that.
allprojects {
repositories {
...
mavenCentral()
}
}
dependencies {
implementation 'com.yogeshpaliyal:universal-adapter:3.0.0'
}
- Content Listing (Supports Multiple View Types)
- Loading + Listing (Showing shimmer items for Loading then showing the actual Listing)
- Loading + LoadMore (Showing loading items and add a item at bottom to create infinite Listing)
- No Data Found
- Error Page
- Async DiffUtils for better performance
Status | List Size | Result Behaviour |
---|---|---|
LOADING | 0 | Show Loading Cells (default 5 items) |
SUCCESS | 0 | No Record Found Layout will be displayed |
ERROR | 0 | Error Layout Shown |
LOADING | more than 0 | Data Cells + load more at end |
SUCCESS | more than 0 | Data Cells |
ERROR | more than 0 | Data Cells + error cell at end |
๐ For more info Check Wiki
Having any issue to get you are looking for, feel free to put your question in Discussion Section and help us Improving this library and Documentation.
Happy Coding ๐
MIT License
Copyright (c) 2021 Yogesh Choudhary Paliyal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.