public interface

BaseExpandableSwipeableItemAdapter

com.h6ah4i.android.widget.advrecyclerview.expandable.BaseExpandableSwipeableItemAdapter<GVH extends androidx.recyclerview.widget.RecyclerView.ViewHolder, CVH extends androidx.recyclerview.widget.RecyclerView.ViewHolder>
Known Indirect Subclasses

Summary

Public Methods
abstract int onGetChildItemSwipeReactionType(CVH holder, int groupPosition, int childPosition, int x, int y)
Called when user is attempt to swipe the child item.
abstract int onGetGroupItemSwipeReactionType(GVH holder, int groupPosition, int x, int y)
Called when user is attempt to swipe the group item.
abstract void onSetChildItemSwipeBackground(CVH holder, int groupPosition, int childPosition, int type)
Called when sets background of the swiping child item.
abstract void onSetGroupItemSwipeBackground(GVH holder, int groupPosition, int type)
Called when sets background of the swiping group item.
abstract void onSwipeChildItemStarted(CVH holder, int groupPosition, int childPosition)
Called when started swiping a child item.
abstract void onSwipeGroupItemStarted(GVH holder, int groupPosition)
Called when started swiping a group item.

Public Methods

public abstract int onGetChildItemSwipeReactionType (CVH holder, int groupPosition, int childPosition, int x, int y)

Called when user is attempt to swipe the child item.

Parameters
holder The ViewHolder which is associated to item user is attempt to start swiping.
groupPosition Group position.
childPosition Child position.
x Touched X position. Relative from the itemView's top-left.
y Touched Y position. Relative from the itemView's top-left.

public abstract int onGetGroupItemSwipeReactionType (GVH holder, int groupPosition, int x, int y)

Called when user is attempt to swipe the group item.

Parameters
holder The ViewHolder which is associated to item user is attempt to start swiping.
groupPosition Group position.
x Touched X position. Relative from the itemView's top-left.
y Touched Y position. Relative from the itemView's top-left.

public abstract void onSetChildItemSwipeBackground (CVH holder, int groupPosition, int childPosition, int type)

Called when sets background of the swiping child item.

Parameters
holder The ViewHolder which is associated to the swiping item.
groupPosition Group position.
childPosition Child position.
type Background type. One of the DRAWABLE_SWIPE_NEUTRAL_BACKGROUND, DRAWABLE_SWIPE_LEFT_BACKGROUND, DRAWABLE_SWIPE_UP_BACKGROUND, DRAWABLE_SWIPE_RIGHT_BACKGROUND or DRAWABLE_SWIPE_DOWN_BACKGROUND.

public abstract void onSetGroupItemSwipeBackground (GVH holder, int groupPosition, int type)

Called when sets background of the swiping group item.

Parameters
holder The ViewHolder which is associated to the swiping item.
groupPosition Group position.
type Background type. One of the DRAWABLE_SWIPE_NEUTRAL_BACKGROUND, DRAWABLE_SWIPE_LEFT_BACKGROUND, DRAWABLE_SWIPE_UP_BACKGROUND, DRAWABLE_SWIPE_RIGHT_BACKGROUND or DRAWABLE_SWIPE_DOWN_BACKGROUND.

public abstract void onSwipeChildItemStarted (CVH holder, int groupPosition, int childPosition)

Called when started swiping a child item. Call the notifyDataSetChanged() method in this callback to get the same behavior with v0.10.x or before.

Parameters
holder The ViewHolder that is associated the swiped item.
groupPosition Group position.
childPosition Child position.

public abstract void onSwipeGroupItemStarted (GVH holder, int groupPosition)

Called when started swiping a group item. Call the notifyDataSetChanged() method in this callback to get the same behavior with v0.10.x or before.

Parameters
holder The ViewHolder that is associated the swiped item.
groupPosition Group position.