public class ItemViewHolder<M>
extends RecyclerView.ViewHolder
RecyclerView.ViewHolder
.Constructor and Description |
---|
ItemViewHolder(android.view.View itemView) |
Modifier and Type | Method and Description |
---|---|
int |
getDragDirections()
Returns the drag directions for the provided ItemViewHolder.
|
M |
getItem()
Returns the item object bounded by this
ItemViewHolder |
int |
getSwipeDirections()
Returns the swipe directions for the provided ItemViewHolder.
|
boolean |
isInActionMode() |
boolean |
isItemExpanded() |
boolean |
isItemSelected() |
boolean |
isSectionExpanded() |
void |
onClick()
If you set the
OnItemClickListener for your ListSection, call this method to get
notified. |
void |
startDrag()
The method lets the user to start dragging the viewholder
|
void |
toggleItemExpansion()
Can be called by the child view holders to toggle the
ItemViewHolder 's expansion
status. |
void |
toggleItemSelection()
Can be called by the child view holders to toggle the selection.
|
void |
toggleSectionExpansion()
Can be called by the child view holders to toggle the
Section 's expansion
status. |
public int getDragDirections()
public M getItem()
ItemViewHolder
ItemViewHolder
public int getSwipeDirections()
public boolean isInActionMode()
public boolean isItemExpanded()
toggleItemExpansion()
public boolean isItemSelected()
toggleItemSelection()
public boolean isSectionExpanded()
toggleItemExpansion()
public void onClick()
OnItemClickListener
for your ListSection, call this method to get
notified.public void startDrag()
public void toggleItemExpansion()
ItemViewHolder
's expansion
status.public void toggleItemSelection()
public void toggleSectionExpansion()
Section
's expansion
status.