davideas / FlexibleAdapter

Fast and versatile Adapter for RecyclerView which regroups several features into one library to considerably improve the user experience :-)
Apache License 2.0
3.55k stars 553 forks source link
actionmode adapter android collapsable draggable endless-scroll expandable fastscroll footers headers livedata multi-select recyclerview search-filters sections selection-coherence sticky-headers swipeable undo viewholder

Android Arsenal Download API Licence Methods and Size

FlexibleAdapter

One Adapter many Apps

:mega: When initially Android:registered: team introduced the RecyclerView widget, we had to implement a custom Adapter in several applications, again and again to provide the items for our views.
We didn't know how to add selection and to combine all the use cases in the same Adapter. Since I created this library, it has become easy to configure multiple views and now, nobody wants to use a ListView anymore.

The idea behind is to regroup multiple features in a unique library, without the need to customize and import several third libraries not compatible among them.

The FlexibleAdapter helps developers to simplify this process without worrying too much about the Adapter anymore. It's easy to use, it has predefined logic for different situations and prevents common mistakes.
This library is configurable and it guides the developers to create a better user experience and now, even more with the new features.

Features in main library

UI extension library :eyeglasses:

Others experimental extension libraries

Setup

build.gradle

repositories {
    jcenter()
}
dependencies {
    // Using JCenter
    implementation 'eu.davidea:flexible-adapter:5.1.0'
    implementation 'eu.davidea:flexible-adapter-ui:1.0.0'
    implementation 'eu.davidea:flexible-adapter-livedata:1.0.0-b3'
    // From 1.0.0-b3, library is compiled with data binding v2
    implementation 'eu.davidea:flexible-adapter-databinding:1.0.0'
}

Stay Updated

Flexible Adapter UI Live Data Data Binding
5.1.0
1.0.0
1.0.0-b3
1.0.0

Wiki!

I strongly recommend to read the Wiki pages, where you can find a comprehensive Tutorial.

Pull requests / Issues / Improvement requests

Feel free to contribute and ask!
Active discussions:

Under the hood

Some simple features have been implemented, thanks to some Blogs (see at the bottom of the page), merged and methods have been improved for speed and scalability.

Showcase of the demo App

You can download the latest demo App from the latest release page OR run it with the emulator.
This Wiki page will give you a short briefing of the demo App.

Overall Adapter Animations Undo Staggered Layout

Endless Instagram Expandables Multi Selection & SC

Drag & Drop swipe-to-dismiss1 swipe-to-dismiss2 ViewPager

Async Filter Search Filter Search Sections

Change Log

Latest release

v5.1.0 - 2018.09.30

Old releases

v5.0.6 - 2018.09.16 | v5.0.5 - 2018.06.03 | v5.0.4 - 2018.05.01 | v5.0.3 - 2018.03.23 | v5.0.2 - 2018.03.17 | v5.0.1 - 2018.03.11 | v5.0.0 - 2018.03.04

Limitations

Item half swipe cannot be implemented due to how the android.support.v7.widget.helper.ItemTouchHelper is done, also clicks on rear view are not possible, same reason. Half swipe can be done with others means, please see issues #98 and #100. See also commits of Apr 25, 2016.

Thanks

Inspired by
Special thanks goes to
Donations

This library is currently free to use and modify, if you would like to say Thank You by donating any amount, you're very welcome! Here the link to PayPal.me:

PayPal.me

Imported libraries

Apps that use this Adapter

It will be a pleasure to add your App here, once it is published.

Module.org | Neuronizer | Nextcloud Talk | Socio - Shake and Connect! | Shibagram | BNVR Client

License

FlexibleAdapter & Extensions

Copyright 2015-2018 Davide Steduto, Davidea Solutions Sprl

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

FastScroller

Copyright 2016-2017 AndroidDeveloperLB, Davide Steduto & Arpinca

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.