FlexibleAdapter


Source link: https://github.com/davideas/FlexibleAdapter

FlexibleAdapter

ANNOUNCEMENT: Important changes in latest release

  • NEW! Third release candidate: v5.0.0-rc3 built on 2017.10.20
  • If you come from previous versions, update your code following the Wiki page Migrations.
  • Please read issues and releases.

One Adapter many Apps

📣 When initially Android 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.

Main features

Extensions

Setup

build.gradle

repositories {
  jcenter()  maven {
url = "https://oss.sonatype.org/content/repositories/snapshots/" 
}
 //For Snapshots 
}
 
dependencies {
  // Using JCenter  compile 'eu.davidea:flexible-adapter:5.0.0-rc3'  compile 'eu.davidea:flexible-adapter-livedata:1.0.0-b1'  compile 'eu.davidea:flexible-adapter-databinding:1.0.0-b2'
 // Using MavenSnapshots repository for continuous updates from my development  compile 'eu.davidea:flexible-adapter:5.0.0-SNAPSHOT' 
}
 

Stay Updated

Flexible Adapter Live Data Data Binding More extensions
5.0.0-rc3
1.0.0-b1
1.0.0-b2
Coming soon

Wiki!

I strongly recommend to read the new Wiki pages, where you can find a comprehensive Tutorial.
Wiki pages have been completely reviewed to support all the coming features of version 5.0.0.

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.

  • At lower level there is SelectableAdapter class. It provides selection features and it's able to maintain the state after the rotation: you just need to call the onSave/onRestore methods from the Activity!
  • At middle level, the AnimatorAdapter class has been added to give some animation at startup and when user scrolls.
  • At front level, the core class FlexibleAdapter. It holds and handles the main list, performs actions on all different types of item paying attention at the adding and removal of the items, as well as the new concept of "selection coherence".
  • New useful extensions and helpers have been added during the time to simplify the development.
  • Item interfaces and predefined ViewHolders complete the whole library giving more actions to the items and configuration options to developers.

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.

* = Publishing to Play Store is foreseen for final release.

Change Log

Latest release

v5.0.0-rc3 - 2017.10.20

Old releases

v5.0.0-rc2 - 2017.06.10 | v5.0.0-rc1 - 2017.01.14
v5.0.0-b8 - 2016.09.17 | v5.0.0-b7 - 2016.06.20 | v5.0.0-b6 - 2016.05.01 | v5.0.0-b5 - 2016.04.04
v5.0.0-b4 - 2016.02.21 | v5.0.0-b3 - 2016.02.08 | v5.0.0-b2 - 2016.01.31 | v5.0.0-b1 - 2016.01.03
v4.2.0 - 2015.12.12 | v4.1.0 - 2015.11.29 | v4.0.1 - 2015.11.01 | v4.0.0 - 2015.10.18
v3.1 - 2015.08.18 | v3.0 - 2015.07.29 | v2.2 - 2015.07.20 | v2.1 - 2015.07.03 | v2.0 - 2015.06.19 | v1.0 - 2015.05.03

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
  • Martin Guillon ( Akylas) to have contributed at the development of the new technique for the Sticky Header.
  • Arpinca who added new features for FastScroller like autoHide and ignoreTouchesOutsideHandle and more.
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:

Imported libraries

Apps that use this Adapter

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

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

License

FlexibleAdapter & Extensions

Copyright 2015-2017 Davide Steduto  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. 

Resources

Assent is designed to make Marshmallow's runtime permissions easier to use. Have the flexibility of request permissions and receiving results through callback interfaces.

MultiLevelListView is an Open Source Android library providing view for displaying items grouped into levels and sub-levels. Levels hierarchy size is not limited. Any particular data model is not required, it fully depends on developer.

Material Intro View is a showcase android library.

A library with custom views based on gestures.

RecyclerViewManager supports PullToRefresh and LoadMore, U can also add headers or footers for RecyclerView. Also supports onItemClickEvent.

Touch and move to show buttons. Touch up and you have 1 second to select button.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes