Skip to content

v5.0.0-b7

Pre-release
Pre-release
Compare
Choose a tag to compare
@davideas davideas released this 20 Jun 17:14
· 547 commits to master since this release

Deprecation and Refactoring (Changes that you have to take care from all previous versions)

  • Refactored class signature for IHeader and IExpandable and their abstract implementation, [see #117].
  • Refactored method moveItem() to swapItem().
  • 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 existent expand() method with initialization info.
  • Items are NOT Draggable and Swipeable by default.
  • Experimenting TreeSet instead of ArrayList for mSelectedPositions. As consequence getSelectedPositions() 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 custom Comparator is needed.
  • Improved method addItemToSection() see JavaDoc.
  • Improved method updateDataSet(), optionally items can be animated, when false a notifyDataSetChanged() 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 for OnItemMoveListener and OnItemSwipeListener to overcome the drag issue with the SwipeRefreshLayout, [see #104 and #83].
  • Added possibility to change mode how DividerItemDecorator is drawn, over or (default) underneath the item [see #106].
  • Added applyAndAnimateMovedItems() when using animateTo() (in filter and updateDataSet()).
  • Full support for StaggeredGridLayout [see #107].
  • Better selection management: made public addSelection(), removeSelection(), the new 2 methods don't notify any change as toggleSelection() 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 in updateDataSet().
  • 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 of IHeader item interface and its implementation. Also changed the class signature of IExpandable item interface and its implementation to have a ViewHolder of type ExpandableViewHolder 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.