Releases: davideas/FlexibleAdapter
Releases · davideas/FlexibleAdapter
v5.0.0-rc2
⚠️ Warning: If you come from previous versions/snapshots, with this update you MUST review your code. Please, follow the Wiki page Migrations.
New features
- Resolved #34 - New Customizable FastScroller is now available, thanks to arpinca.
- Resolved #217 - Extension for data binding.
- Resolved #259 - Endless scrolling in both directions. If activated, items can only be inserted at the top of the list, top endless is complementary to the bottom endless.
- Resolved #302 - Allow to use custom LayoutManagers on the RecyclerView.
- Resolved #382 - New advanced
FlexibleItemDecoration
.
Deprecations / New Behaviors
- Update to support library 25.4.0. Read instructions on https://developer.android.com/topic/libraries/support-library/setup.html.
- Adapter now makes a copy of the provided list at startup, updateDataSet and filterItems, before applying features (from support #316), as consequence you should remove the copy of the list in these 3 situations.
onPostUpdate()
andonPostFilter()
now require to callsuper()
otherwise the emptyView won't get notified!- Starting or resetting the Filter will empty the bin of the deletedItems (see #341 and #342).
- Get rid of Method B to create and bind ViewHolders. From now on, we will use only Method A: we will delegate the previous operations to the item interfaces. Item interfaces will now mandatory implement the following methods:
getLayoutRes()
,createViewHolder()
andbindViewHolder()
(see #344). - Making use of interface
Mode
to change selection mode (constantsMODE_*
are now deprecated). - Renamed
DividerItemDecoration
toFlexibleItemDecoration
. - Renamed
Utils
toFlexibleUtils
. - Resolved #377 - Item content not updating when animating
updateDataSet
(changing default behavior ofnotifyChangeOfUnfilteredItems
totrue
).
Improvements
- Resolved #269 - Setting to load more at startup when adapter list is initially empty/null.
- Resolved #281 - Delegate spanSize to IFlexible item.
- Resolved #288 - UndoHelper.remove(...) return type reverted to Snackbar.
- Resolved #293 -
getItemViewType
now returns zero when item not found. - Optimized
updateDataSet()
andfilterItems()
: now hidden items are restored before applying the feature, so they won't get notified for removing and adding same items, but only for updating. This will improve performance avoiding useless notifications. - Resolved #293 -
getItemViewType
now returns zero when item not found. - Resolved #321 - Now items have option to be or not to be notified for a change if unfiltered
IFlexible.shouldNotifyChange()
. - Resolved #333 - StateListDrawable with
state_pressed
for API < 21. - Resolved #339 - Sticky headers in filtered list.
- Resolved #343 - Allow to unbind ViewHolder
IFlexible.unbindViewHolder()
. - Resolved #348 - Customizable minimum scroll amount to show the FastScroller.
- Resolved #348 - FastScroller can now be enabled/disabled at runtime again with a better toggle to enable/disable FastScroller.
- Resolved #357 - Allow usage of
Parcelable
for IHeaders and IFlexible. - Resolved #362 - Improved filter engine: Filter items with optional originalList (works also with multi level).
- Resolved #363 - Simplified the method
createViewHolder()
in IFlexible. - Resolved #376 - Sticky header preserves current offset from ItemDecorations.
- Resolved #379 - Preventing possible NullPointerException.
- Resolved #381 - Provided a better internal log system which does not allocate objects.
- Created new method
setFullSpan()
inFlexibleViewHolder
. - Created new method
getCurrentItems()
, returns the current internal list unmodifiable. - Created new method
isFiltering()
, returnstrue
if the AsyncTask is currently running. - Created new method
updateItem()
overload method. - Added generic type param when returning FlexibleAdapter object.
- Increased
ANIMATE_TO_LIMIT
to1000
items. - Support libs to 25.3.1 (from question #331).
- Project is now built with
provided
scope for RecyclerView Support lib. - New build scripts to support extensions modules.
- New comprehensive Wiki pages!
Fixes
- Fixed #268 - Sticky headers don't work when all headers are initially collapsed.
- Fixed #284 -
removeAllScrollableFooters()
seems to notify incorrect item range. - Fixed #291 - progressItem not hidden automatically if delay is zero and no items loaded or Endless is disabled.
- Fixed #292 -
HandlerCallback
mistakenly erases default Runnables posted on it'smHandler
. - Fixed #294 - Expandable header is not resized / redrawn on automatic configuration change when sticky headers are enabled.
- Fixed #295 - Items not notified on auto collapse (using normal List instead of Hash to avoid Inconsistency detection. It will be slower on big List when collapsing).
- Fixed #296 -
autoCollapseOnExpand(true)
seems not notify the header. - Fixed #297 - Empty (Invisible) Header Item when Using Sticky Headers.
- Fixed #299 - ClassCastException after click on expanded sticky header when AutoCollapse is enabled.
- Fixed #320 - point 1) Sometimes the sticky header view losses it's background.
- Fixed #320 - point 2) Sometimes the sticky header is not shown correctly when is being collapsed.
- Fixed #322 - Loop in
getSectionItemPositions()
. - Fixed #328 - Filtering issue during delete search query (make sure index is in bounds).
- Fixed #347 - Sticky Header doesn't update selected view state correct for Single & Multi selection.
- Fixed #352 - Multilevel expandable list - Sub-Sub-Items are now filtered
- Fixed #350 - LayoutManager is now independent to be initialized before/after setting adapter.
- Fixed #365 - Fixed condition for showing header.
- Fixed #369 - FastScroller fix - Added OnScrollListener in
onAttachedToWindow()
as counterpart ofonDetachedFromWindow()
, when ViewPager Adapter is changed at runtime. - Fixed #371 - Bug in positions calculation in
clearAllBut()
. - Fixed #372 -
clearAllBut()
clears everything when no view type is specified (now Scrollable items are retained as Javadoc states). - Fixed #373 - java.util.ConcurrentModificationException with Undo after multiple rapid swipe removals.
DemoApp
- Modified demoApp to not show LayoutInfo at each use case.
- Fixed ButterKnife binding.
- Updated Robolectric test library to v3.3.2 to support API 25.
- Added unit tests for
updateDataSet()
. - Added unit tests for
clearAllBut()
. - Better Toolbar Styles for API preLollipop.
- Adapted the demoApp to the new
FlexibleItemDecoration
and fixed some bugs around.
ℹ️ Note:
- Sample App has new package signature, please manually uninstall the previous to avoid duplication.
- If swipe does not properly animate: please be sure that FrontView is at lower level in the layout to support API < 21.
v5.0.0-rc1
⚠️ Warning: If you come from previous versions, update your code by following the Wiki page Migrations as well as issue #200 for deprecation and refactoring.
New features
- Resolves #236 - Scrollable Headers and Footers: items that lay respectively at the top and at the bottom of the main items.
- Resolves #233 brand new Endless Scrolling with
pageSize
andtargetCount
limits.
Deprecation and Refactoring
- Refactored and Deprecated all marked methods in issue #200.
Improvements
- Resolves #176 - Drop event, without swapItems on move (
ItemTouchHelperCallback
can now be set). - Resolves #190 - Added method to change the SnackBar Action color.
- Resolves #198 - Added
onPostFilter()
andonPostUpdate()
that allow to modify the list just after the Asynchronous filter and update. - Added new methods to support
DiffUtil
and to animate changes with this new Android class, after an update or filter operations, BUT it's strongly suggested to use the default calculation. See demoApp in Async Filter example to compare the 2 solutions: the default solution results faster at least of the double! - Added methods
clear()
andclearAllBut(viewTypesToRetain)
,addItem(item)
,shouldNotifyParentOnClick()
,getAllBoundViewHolders()
, see #201. - Resolves #227 - Elevated header items and Elevated sticky header items.
- Resolves #248 - Surgery precision for transparency and elevation for sticky headers.
- Resolves #228 - No XML layout configuration for sticky headers.
- Resolves #168 - Added Info log for parameters and listeners initialization (to see, enable logs as usual) and added version log at startup and Info on animation when changing LayoutManager.
- Runtime background, changing state has short enter-exit fade animation.
- Selection methods
clearAll()
andselectAll()
don't notify change anymore. - Imported the last ActivatedPosition in the
ActionModeHelper
, which has a new method:getActivatedPosition()
. - Optimized selection coherence for a parent with a selected sub item at any level.
- Reviewed how the internal
Handler
can be overridden: new internal classHandlerCallback
has been created. - Upgrade to API 25 and Android Studio project to 2.2.3.
- Reviewed Java Doc.
Fixes
- Fixed #184 - Problem with endless scrolling and LOAD_MORE_RESET delay.
- Fixed #191 - AsyncFilter fatal error (Empty string will skip the search).
- Fixed #210 - Problem with item content change animation.
- Resolved the high delay for scroll animation on the first visible item after rotation.
- Fixed collapsing bug for a parent with selected sub items.
- Fixed #229 - Calling
hideAllHeaders()
might lead to NullPointerException (Fixed NPE and modified behavior when hiding headers: now, it doesn't disable anymore the sticky flag) - Fixed #244 - Header item doesn't swap if it matches with the first layout position.
- Fixed #265 - UndoHelper dismissed quickly with SnackBar predefined lengths.
- Fix for
adjustSelection()
when adding new items and some items are already selected. - Decided to adopt Solution 2 for scrolling animation; Solution 1 has been removed. Fixed a couple of scrolling animation issues, now scrolling are animated properly in all situations. Scrollable Headers will now scroll animate. Scrollable Footers cannot scroll animate, when inserted the very first time.
Demo App
- Added example with ViewPager.
- Added example for Item Model Holder.
- Added option for DiffUtil in Async Filter example, to compare the 2 solutions implemented. (Refreshing the some lists will update the subtitle of the items, with the numbers of the refreshes).
- Modified demoApp to showcase Scrollable Expandable Headers and Footers.
- Modified demoApp to showcase the new Endless Scroll.
- Removed some calls of deprecated methods.
v5.0.0-b8
Deprecation and Refactoring
- Refactoring behaviour of
setPermanentDelete()
: default value starts withtrue
. Creating theUndoHelper
instance, the value will be set tofalse
automatically. - Refactored
shouldAnimate
default value fromtrue
tofalse
. Items are not animated anymore by default, you need to enable the scrolling animations with.setAnimationOnScrolling(true)
. - When
setOnlyEntryAnimation()
is set true,shouldAnimate
is automatically set true, however when the screen is filled with last visible item,shouldAnimate
is again false. - Marked some methods with
//TODO: deprecation?
. Those methods are under evaluation and could disappear in the final release. - Enabled
shouldMoveItem()
callback inOnItemMoveListener
. - Deprecated removeItemWithDelay() with 'resetLayoutAnimation' param.
- Deprecated
getAnimators()
in favour of the new methodscrollAnimators()
inFlexibleViewHolder
. - Deprecated
animateView()
method, now it is automatically called from the adapter. - Deprecated/Moved all add animation methods from Adapter into
AnimatorHelper
.
DividerItemDecoration
- Added new method
withOffset()
. - Fixing NPE when no divider is provided.
- Fixed normal item offset.
Improvements
- Added
@since
for all methods. - Added new method
getSectionItemPositions()
. It resolves #132. - Added new method
setAnimateToLimit()
. - Improved performance while filtering high numbers of items. This resolves #133 part 1: call
notifyDataSetChanged()
. Animation during filtering will be performed if the total items are below the limit of 600 (modifiable value) "current items" OR "filtered items"; Above this limit,notifyDataSetChanged()
will be called with no animation. Note:updateDataSet()
is also affected by this limit, it improves performance during the refresh operation with big list. - Option to display entry animation only. See #125.
- Method in
FlexibleViewHolder.setDragHandleView()
is not final anymore! - Improvement performance when resetting filter flags for Expandables.
- Upgrade to Android N (API 24), SupportLib 24.0.0, Java8.
- Reviewed the comments for AutoMap.
- Added new method
setNotifyMoveOfFilteredItems()
. - Experimental: Added AsyncTask with synchronization animations. Fixed #133 part 2: AsyncFilter. Really lot of items can be filtered in a very short time. Adapter need to be configured accordingly, new Fragment in the demoApp helps to understand how to.
- Experimental:
updateDataSet()
is now run Asynchronously too. - Experimental: Improved performance when
collapseAll()
with big list. - Experimental: Improved performance on
showAllHeader()
andhideAllHeaders()
. - Added Payload enumeration, this resolves #134.
- New methods in
Utils
classfindFirst/LastCompletelyVisibleItemPosition()
. - #144 - Adapter initialization and
updateDataSet()
with no notifyItemXXX() on headers. - #146 - Improved calls to
setDisplayHeadersAtStartUp()
andshowAllHeaders()
to avoid duplication of headers by a non correct initialization. As consequence 2 effects are now possible when callingsetDisplayHeadersAtStartUp()
read method comment, documentation will follow. - Adapter can be initialized with a null or empty list:
addItems()
can be safely called, but no scrolling animation on loading can be performed. - Expand items at startup can now expand all Levels of Expandable, if expanded is initially set true.
updateDataSet()
is also compatible with the last status of sub levels. - Method
getItemId()
now returnsitem.hashCode()
of the current position. - Added
stableIds
to theFlexibleAdapter
constructor. - Added AnimationDuration (configurable) for Drag and Swipe.
- #151 - Added
SmoothScrollStaggeredLayoutManager
+ configurable millisecondsPerInch. - Added
setUseStepDelay()
to synchronize the animations all together at startup. - Added
animators()
method inFlexibleViewHolder
for scroll animations. - Added
FlexibleItemAnimator
class andAnimatedViewHolder
interface for add/remove animations. - Added
AnimatorHelper
.
Fixes
- Fixed #130 - An unnecessary call to super.onBindViewHolder() caused loop-calls throwing StackOverflowError. As consequence, method
onLoadMore()
is now protected to be manually called only when METHOD B (binding items in classic way) is implemented. - Fixed #128 -
getStickySectionHeadersHolder()
should return a ViewGroup with LayoutParams coherent and initialized by the user who knows how these params has to be initialized. An exception will be raised if params are nulls. - Fixed #126 -
onUpdateEmptyView()
is not being correctly called inupdateDataSet() if size > 0
. - Fixed #121 - Sticky header glitch when header layout has height set to "wrap_content"
- Modified FastScroller bubble padding.
- Fixed #143 -
calculatePositionFor()
doesn't work correctly when used foraddItem()
. - Fixed #142 - 1st item is displayed under sticky header at start up and after
updateDataSet()
. - Fixed #139 - Sticky header is not resized on automatic configuration change.
- Fixed #135 - The AsyncTask changes made obsolete the fix of missing parenthesis generating a NPE.
- Fixed filter: when no headers are displayed, headers were displayed too. Now the result is coherent with the last state.
- Fixed some NPEs when null is passed to the constructor.
- Fixed scrolling animation flags.
- Fixed #148 - Support for Drag&Drop in GridLayout with Automatic header linkage and headers rebound.
- Fixed #143 -
calculatePositionFor()
doesn't work correctly when used withaddItem()
. - Fixed #161 - ContextThemeWrapper cannot be cast to Activity when "theme" attribute is used in the layout in combination with
getStickySectionHeadersHolder()
. - Fixed #173 - Inconsistency detected with asynchronous item update.
- When sticky header is enabled, element header at position 0, can now be dragged: layout for sticky header is cleared out, before it was not possible.
Demo App
- BackPressed now goes back to overall View. App entry fade animation?
- StaggeredLayout is the default at startUp.
- Using Method B to bind the FragmentOverall instead of the AutoMap view item interfaces.
- Fixed bug that triggered the filter when searchView is initially opened.
- Experimental: Added a real(!)
SplashActivity
. - Added new
FragmentAsyncFilter
, here you can customize the Adapter and the database dynamically. - Added
DatabaseType
enumeration and createdConfigurationDatabase
. - Changed layout for drawer and updated the menu with check boxes.
- Reviewed menu items options with check boxes.
- Added menu item for toggleFastScroller()
- Added menu items persistent through some example fragments.
- For update data set (refresh to see different result);
- For scrolling animation (reopen the page from the drawer menu to see different result).
- More JUnit test for ItemComparator
- Fixed NPE when closing app before the execution of Runnable.
- Resolved the problem when Layout for sticky header is customized and the header disappeared.
- Added example for Item Animators and Scroll Animations, reviewed the whole Demo App to fullfil the new requirements for animations.
v5.0.0-b7
Deprecation and Refactoring (Changes that you have to take care from all previous versions)
- Refactored class signature for
IHeader
andIExpandable
and their abstract implementation, [see #117]. - Refactored method
moveItem()
toswapItem()
. - Separated the initialization of expanded items at start up [see #86]:
expandItemsAtStartUp()
must be explicitly called by the user in Activity creation phase,expandItemsAtStartUp()
method now uses the existentexpand()
method with initialization info. - Items are NOT Draggable and Swipeable by default.
- Experimenting
TreeSet
instead ofArrayList
formSelectedPositions
. As consequencegetSelectedPositions()
returns a copied List from the Set (already sorted, no duplication)! - Deprecated method
addSection()
with refHeader, will be removed from next release.
Improvements
- Dragging and swiping can be enabled by type [see #80].
- Alpha animation, when enabling / disabling sticky headers.
- Added new method
getItemTouchHelperCallback()
to customize Swipe and Drag behaviors. - Added new method
addSection()
with Comparator object. - Added new method
moveItem()
that simply moves an item without swapping it. - Added new method
calculatePositionFor()
useful for new items of every type, a customComparator
is needed. - Improved method
addItemToSection()
see JavaDoc. - Improved method
updateDataSet()
, optionally items can be animated, whenfalse
anotifyDataSetChanged()
will be executed. - Added 2 new overload methods for
expand()
series [see #110]. - Added class
UndoHelper.SimpleActionListener
to simplify the development. - Added class
DrawableUtils
to manage the background Drawables at runtime without XML configuration [see #35]. - Added new base interface
OnActionStateListener
forOnItemMoveListener
andOnItemSwipeListener
to overcome the drag issue with theSwipeRefreshLayout
, [see #104 and #83]. - Added possibility to change mode how
DividerItemDecorator
is drawn, over or (default) underneath the item [see #106]. - Added
applyAndAnimateMovedItems()
when usinganimateTo()
(in filter andupdateDataSet()
). - Full support for
StaggeredGridLayout
[see #107]. - Better selection management: made public
addSelection()
,removeSelection()
, the new 2 methods don't notify any change astoggleSelection()
does. Utils.colorAccent
is now public.onUpdateEmptyView()
is now called only if there was a change from 0 / to 0 itemCount [see #113].- Chaining the Adapter for all initialization and configuration methods (sets).
- Upgrade to SupportLib 23.4.0.
Fixes
- Fixed headers showing after rotation [see #88].
- Fixed
addItemToSection
when Header is hidden: item is now added to the unique visible list. - Temporary solution to improve ViewHolder with sticky behaviour, (user has to pass
true
as new parameter to the FVH super.constructor). [see #78, #79 and #92]. - Removed useless call in
onChanged()
, causing duplication of subItems when updating the data set [see #95 and #96]. - Fixed hidden status when removing a Header item.
- Fixed Item does not updated after
updateDataSet()
[see #94]. - Fixed NPE bug during filter and null subList [see #103].
- Fixed NPE on originalText in
Utils.hightlightText()
[see #112]. - Fixed expansion status after filtering expandable items.
- Fixed animation changes when calling method
animateTo()
. - Fixed ArrayIndexOutOfBoundsException with StaggeredGridLayoutManager [see #87, part of changes of #107].
- Adjusted selection flags when removing items and fixed small bug when restoring items after applying the filter and vice-versa.
- Method
onUpdateEmptyView()
is now called when passing null or empty new list inupdateDataSet()
. - Filter on restore instance state bug [see #111].
- Fixed header View params when higher than Item view params [see P.R. #116].
- Fixed Constraint on
FlexibleViewHolder
when using StickyHeader functionality, as consequence changed class signature ofIHeader
item interface and its implementation. Also changed the class signature ofIExpandable
item interface and its implementation to have a ViewHolder of typeExpandableViewHolder
as well [see #117].
Demo App
- Added new example Fragment for StaggeredLayout with multiple functionalities:
- merge/split items at runtime (position are recalculated);
- move item with animation taking care of the groups using the new function
calculatePositionFor()
; - automatic sorting when adding new items using the new function
addItemToSection()
; - example of Comparator object;
- change Drawable background at runtime, maintaining the ripple effect (no XML is used).
- Fix for SwipeRefreshLayout to be displayed on the top of StickyHeaders Layout [see #83].
- SwipeRefresh with StickyHeader is not compatible with Dragging feature, added comments in the layout to show the difference #83: User must disable the SwipeRefreshLayout programmatically, to do it, I added a new callback function and relative listener
OnActionStateListener
. - Adjusted demo App behavior when filtering with Endless Scrolling.
- Some others minor changes.
v5.0.0-b6
Refactor
- Removed
isSelected()
andsetSelected()
fromIFlexible
interface. - Deprecated and removed
getSectionableOf()
in favor of the newgetSectionItems()
. - Improved instance state on rotation.
- Renamed package
eu.davidea.examples
ineu.davidea.samples
.
Improvements
- Brand new Swipe-To-Dismiss implementation: added custom rear views Left/Right! [See #21].
- Added
UndoHelper
[See #29]. - Added
ActionModeHelper
[See #30]. - Added EndlessScroll/OnLoadMore, using adapter binding, not scroll listener! [See #43].
- Modified
DividerItemDecorator
to accept a custom resource and gap between sections [See #60]. - New methods:
addSection()
,addItemToSection()
[See #62]. - Improved
isEnabled()
onIExpandable
items. - Improved methods
getSectionItems()
andgetHeaderItems()
. - Support for
StaggeredGridLayoutManager
when using Adapter Animation. - Added possibility to filter Header item AND to keep the header also if a subItem has been filtered in [See #73].
Multi-level expansion
- Added possibility to chain Expandable items into others expandable [See #63].
- Item restoration works in multi-level expansion: expanded children are forced to collapse before restoration.
- Selection coherence in multi-level expansion.
FastScroller
- Added a small gap between bubble and handle.
- Auto handling a change of a new LayoutManager when
FastScroller
is configured. Now FastScroller should work in every situations. - Added SmoothScroll for
GridLayoutManager
and optimized smooth scrolling classes.
Fixes
- Fixed inconsistency bug when expanding/collapsing sticky header items not fully visible.
- Fixed StickyHeaders with
GridLayoutManager
when all sub-items of a section fit the single row of span count [See #61]. - Fixed #74: Initialization of the stickyHeader is laid out in post.
- Fixed the automatic linkage for headers and sections when delete and undo.
- Fixed the automatic linkage for headers and sections. Force collapsing when dragging expandable.
- Fixed NPE when setting a null
FastScroller
instance [See #66]. - Fixed new position in
addSection()
. - Adjusted behaviours for swipe and drag view activation.
- Fixed the delay on the 1st item when animating the view.
Demo App
v5.0.0-b5
Refactor
- Constructor of
AbstractSectionableItem
now accepts theIHeader
interface. setHeader(header)
inISectionable
interface is changed to void method.- Renamed method
Utils.setHighlightText()
toUtils.highlightText()
. StickyHeaderDecoration
is now deprecated, as consequenceenableStickyHeaders(maxCachedHeaders)
is also deprecated: useenableStickyHeaders()
.
Improvements
- Headers are clickable when sticky! Thanks to @farfromrefug. StickyHeaders can now benefit of the existing click listeners in
FlexibleViewHolder
[See #41]. Pay attention at the methodgetStickySectionHeadersHolder()
. IHeader
item can be combined withIExpandable
item to make a section expandable with header.- Adding items with new headers, headers are also shown.
- Added
AbstractExpandableHeaderItem
. - Added a new Wiki page about how to implement sections with sticky headers and expandable sections. Direct link: Headers and Sections.
- Added new methods getItemCountOfTypesUntil(), removeItemsOfType(), hasNewSearchText().
- Multiple code improvements with SonarQube tool, thanks to @georgekankava.
Fixes
- Fixed NPE in
isEnabled(position)
when position is unknown. - Fixed header linkage when deleting/restore items with header. It's important now that all sectionable items must initialize the own header at startup.
- Bug fixing on SearchView and FilterMethods.
- Fixed view activation elevation [See #38].
- Fixed adapter item animation at startup.
Demo App
- New example app supporting multiple fragments [See #19].
- Added an example of
FlexibleItemHolder
to use simultaneously the same modelData object in multiple RecyclerView/Adapters. - Adapted code for Expandable Sections with headers. Enabled demo option for
FragmentExpandableSections
. - Demo app has more clear DatabaseService. It shows how to create item interfaces.
- FlipView animation for Fragments.
- Unfortunately the demo app has a known bug on FastScroller when changing Fragment, but FastScroller is planned to be changed.
v5.0.0-b4
Headers
- Added Sticky Header functionality [See #32].
- New IHeader interface has been added to identify the fact the item is a Header item, as consequence, ISectionable interface now has to be assigned to the items(!!) in order for them to hold the reference to the IHeader item.
- Headers are shown/hidden during expand/collapse if they belongs to children.
- Headers work in combination with restore items, in all situations (... the ones I have foreseen).
- Headers can also be deleted and restored in any situations: they are re-linked all the time with the item below it.
- Headers can be dragged, swapped and receive the new swapped item.
- Dragging items, it automatically re-links the header in almost all situations (the logic can be improved).
- Support for Orphan Headers: deleting all items under a header, when the headers are visible and hidden, it makes the header orphan, an option has been added to delete the orphan headers as well. Currently the orphan headers, ones hidden, cannot be shown anymore (they are lost, food for the gc), you should re-link them manually.
Filter
- Added IFilterable item interface. New clean way to filter items, Items can now implement filter() method in order to be collected for the filtered list.
Improvements
- FlexibleAdapter is not anymore abstract.
- Added support for AndroidStudio 2.0 InstantRun: updated Gradle plugin.
- Added support for isSelectable() it should now be usable.
- Added methods addSubItems() and addAllSubItemsFrom().
- Transformed all "add" methods in a chain of calls.
- Added minimal support for isEnabled().
- Added a nice DividerItemDecorator into library [See #33].
- Completely changed the logic how a removed item saves restoration info (now a removed item has an internal reference that should never fail, adjustRemoved() became obsolete and has been removed).
- Included in the library Utils class the method setHighlightText() Useful to highlight text coming from a search action.
- Made a better use of Payload when notifyItemChanged is triggered.
- Restoring all items, now it's much faster in case of restoreSelection is enabled.
- Cast optimization: removed unnecessary 8 casts by changing some parameters of methods from generic object T to IFlexible and IExpandable types, this should be transparent.
Fixes
- Fixed crash problem with SelectAll and improved method logic.
- Fixed last expandable item in expandAll().
- Fixed automap when not using it.
- Fixed others minor bugs.
- Added Copyright notice on the top of the files.
Refactor
- Modified the signature of getCurrentChildren() to accept an IExpandable object.
- Renamed IFlexibleItem to IFlexible.
- Moved into common folder the SmoothScrollLinearLayoutManager class.
v5.0.0-b3
- Header/Section with new ISectionable item [See #31](still need to add features on this).
- Redesigned the Item interfaces to simplify development and usability.
- Merged the FlexibleExpandableAdapter into FlexibleAdapter.
- mItems is now private and fully synchronized, the new method updateDataSet allows to update full content and notifyChange.
- Auto-mapping of the ViewType (using Layout resourceId) when using implementation of IFlexibleItem interface.
- Possibility to disjoint Creation and Binding of the View Holder in the Model items OR (user choice) to create and bind the view inside the Adapter (as usual).
- 3 new configurations for FlexibleViewHolder in combination with onTouch, selection and ActionMode state.
- Customizable view elevation on item activation [See #38].
- Better implementation of Expandable items.
- Added possibility to have Expandables inside another Expandable. Limits are described.
- Added support for Payload when notifyItemChanged is called (still need to work on this).
- New method addItemWithDelay().
- Use of Log.error instead of Log.warn.
- New options menu for example App for the showcase.
v5.0.0-b2
(Everything might change!)
- Expandable items with selection coherence [See #23].
- Drag&Drop and Swipe actions with selection coherence and ActionMode compatible [See #21].
- Adapter Animations with customization based on adapter position - viewType - selection [See #15].
- New concept of Item: added IFlexibleItem and IExpandableItem interfaces to implement around the model object.
- Several new functions that help to handle all new situations.
- New advanced filtering: Delayed + Animations while filtering [See #24].
- Simplified constructor [See #25] and new configuration setters.
- Added FastScroller in the library [See #20](This will probably change, in favor of [MaterialScrollBar]%28https://github.com/krimin-killr21/MaterialScrollBar%29).
- Added support for Grid Layout also in the expandable version.
- Included showcase for the new FlipView library.
- and much more...
- Adapted example App accordingly (but a new example App is foreseen, in order to show all the power this library has).