-
-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] FastAdapter v3 refactor #443
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…erView.Adapter` * remove the concept of wrapping from the core library * the FastAdapter will now directly be initialized with the adapters it should use (in addition you can add new ones at a later point) * we no longer have an order in our adapters --> we no longer need a Footer or HeaderAdapter (just add your adapters in the order you need them) * simplify AbstractAdapter * simplify adapters access in the FastAdapter * simplify DragDropUtil --> it only needs the ItemAdapter, as this one already notifies automatically when the `move` method is used * temporary disable realm and firebase extensions
* make sure the normal bindViewHolder call is not called if legacyBindViewMode is activated (to prevent twice the binds) ^^ * this is anyways just a hack for the weird case of a library not properly implementing the `onBindViewHolder` method (in case we depend on the event being forwarded to us..) * add FastAdapter to the `OnCreateViewHolderListener` methods so it is properly possible to get the handled TypeInstance from the viewType and it's parent * add getEventHooks() method
* adjust test as we need a view inside the ViewHolder to set the Tag * update to new compatible MaterialDrawer SNAPSHOT
* implement `IAdapterExtension` interface * implement `ExpandableExtension` * move all expandable depending logic to the extension * update sample app and MaterialDrawer to support the extension
* still keep the methods as easy access within the FastAdapter --> may be revisited in the future
* remove the positionBasedStateManagement, it's just unnecessary code overhead, and hard to maintain * the identifierBasedStateManagement has many advantages and it's only overhead is that we have to run once over the whole list of items (in the worst case) * fix issue with the SelectExtension not getting properly initialized * simplify getSelectedItems and getSelections * remove no longer needed util functions
# Conflicts: # library-core/build.gradle # library-core/gradle.properties # library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java
* update gradle build tools
… dependency issue
Remaining TODO's
|
* automatic defined id's are negative (starting with -2)
* add group in the gradle builds * add expandable module
* ModelItemAdapter * ModelAbstractITem * ..
* adjust selectExtension to remove dependency on Expandable extension
…sues because people don't provide id's
* also update core version snapshot
* The default implementation will use an shared cache for all fast adapter instances * Its now possible to implement an own caching solution for the type instances
[V3] Bug/expandable no intercept
[V3] Feature/shared type instance cache
* update gradle build tools
… do the heavy work (the item can be even more dumb) * if FastAdapter.ViewHolder is used, the callbacks on the item are not used
[V3] Clever ViewHolder
… the adapter after a `set` happened
* update README for v3
af23c32
to
bfb748d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TEST
You can currently try the v3 snapshot using the following dependency:
WARNING not yet updated for v3.0.0.7
As the APIs changed quite a lot there are compat releases for the MaterialDrawer, and the AboutLibraries
CHANGELOG
RecyclerView.Adapter
move
method is usedonBindViewHolder
method (in case we depend on the event being forwarded to us..)OnCreateViewHolderListener
methods so it is properly possible to get the handled TypeInstance from the viewType and it's parentExtension
functionalityIAdapterExtension
interfaceExpandableExtension
selectable
has to be true to enable selecting