android-advancedrecyclerview v1.0.0 Release Notes

Release Date: 2018-12-16 // 12 months 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
      }