android-advancedrecyclerview v1.0.0 Release Notes
Release Date: 2018-12-16 // over 4 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 theDraggableItemViewHolder
interface - ๐ New
SwipeableItemState getSwipeState()
method added to theSwipeableItemViewHolder
interface - ๐ New
ExpandableItemState getExpandState()
method added to theExpandableItemViewHolder
interface
[New features & improvements]
- Introduced
DraggableItemState
, no moreDraggableItemConstants.STATE_FLAG_**
bit operations required anymore in user code - Introduced
SwipeableItemState
, no moreSwipeableItemConstants.STATE_FLAG_**
bit operations required anymore in user code - Introduced
ExpandableItemState
, no moreExpandableItemConstants.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
andDraggableItemAdapter
[New features & improvements]
- โฌ๏ธ Bumped Support libraries to v27.0.0
- A new callback
onItemSwipeStarted()
is added toSwipeableItemAdapter
to reduce implicitly calls of thenotifyDataSetChanged()
method.
Migration code:
@Override public void onSwipeItemStarted(MyViewHolder holder, int position) { notifyDataSetChanged(); // or you can implement better invalidation code here }
- ๐ New callbacks
onItemDragStarted()
andonItemDragFinished()
are added toDraggableItemAdapter
to reduce implicitly calls of thenotifyDataSetChanged()
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 }