android-advancedrecyclerview v1.0.0 Release Notes

Release Date: 2018-12-16 // over 5 years ago
  • [Breaking changes]

    • Migrated to AndroidX
    • โœ‚ Removed some deprecated features
      • BaseWrapperAdapter
      • SwipeableItemConstants.REACTION_CAN_SWIPE_BOTH
      • SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH
      • SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH_WITH_RUBBER_BAND_EFFECT
    • ๐Ÿ†• New DraggableItemState getDragState() method added to the DraggableItemViewHolder interface
    • ๐Ÿ†• New SwipeableItemState getSwipeState() method added to the SwipeableItemViewHolder interface
    • ๐Ÿ†• New ExpandableItemState getExpandState() method added to the ExpandableItemViewHolder interface

    [New features & improvements]

    • Introduced DraggableItemState, no more DraggableItemConstants.STATE_FLAG_** bit operations required anymore in user code
    • Introduced SwipeableItemState, no more SwipeableItemConstants.STATE_FLAG_** bit operations required anymore in user code
    • Introduced ExpandableItemState, no more ExpandableItemConstants.STATE_FLAG_** bit operations required anymore in user code
    • Annotated many public method with @NonNull or @Nullable

    ๐Ÿฑ ๐Ÿ‘‰ Migration guide from v0.11.0 to v1.0.0


Previous changes from v0.11.0

  • [Breaking changes]

    • ๐Ÿ”„ Changed minimum SDK level to v14
    • ๐Ÿ†• New callbacks are added to SwipeableItemAdapter and DraggableItemAdapter

    [New features & improvements]

    • โฌ†๏ธ Bumped Support libraries to v27.0.0
    • A new callback onItemSwipeStarted() is added to SwipeableItemAdapter to reduce implicitly calls of the notifyDataSetChanged() method.

    Migration code:

      @Override
      public void onSwipeItemStarted(MyViewHolder holder, int position) {
          notifyDataSetChanged(); // or you can implement better invalidation code here
      }
    
    • ๐Ÿ†• New callbacks onItemDragStarted() and onItemDragFinished() are added to DraggableItemAdapter to reduce implicitly calls of the notifyDataSetChanged() method.

    Migration code:

      @Override
      public void onItemDragStarted(int position) {
          notifyDataSetChanged(); // or you can implement better invalidation code here
      }
    
      @Override
      public void onItemDragFinished(int fromPosition, int toPosition, boolean result) {
          notifyDataSetChanged(); // or you can implement better invalidation code here
      }