public class ActionModeHelper<Item extends IItem>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ActionModeHelper.ActionItemClickedListener |
static interface |
ActionModeHelper.ActionModeTitleProvider |
| Constructor and Description |
|---|
ActionModeHelper(<any> fastAdapter,
int cabMenu) |
ActionModeHelper(<any> fastAdapter,
int cabMenu,
ActionMode.Callback callback) |
ActionModeHelper(<any> fastAdapter,
int cabMenu,
ActionModeHelper.ActionItemClickedListener actionItemClickedListener) |
| Modifier and Type | Method and Description |
|---|---|
ActionMode |
checkActionMode(AppCompatActivity act)
check if the ActionMode should be shown or not depending on the currently selected items
Additionally, it will also update the title in the CAB for you
|
ActionMode |
getActionMode() |
boolean |
isActive()
convenient method to check if action mode is active or nor
|
java.lang.Boolean |
onClick(AppCompatActivity act,
IItem item)
implements the basic behavior of a CAB and multi select behavior,
including logics if the clicked item is collapsible
|
java.lang.Boolean |
onClick(IItem item)
implements the basic behavior of a CAB and multi select behavior,
including logics if the clicked item is collapsible
|
ActionMode |
onLongClick(AppCompatActivity act,
int position)
implements the basic behavior of a CAB and multi select behavior onLongClick
|
void |
reset()
reset any active action mode if it is active, useful, to avoid leaking the activity if this helper class is retained
|
ActionModeHelper<Item> |
withAutoDeselect(boolean enabled) |
ActionModeHelper<Item> |
withSupportSubItems(ExpandableExtension expandableExtension)
Deprecated.
|
ActionModeHelper<Item> |
withTitleProvider(ActionModeHelper.ActionModeTitleProvider titleProvider) |
public ActionModeHelper(<any> fastAdapter,
int cabMenu)
public ActionModeHelper(<any> fastAdapter,
int cabMenu,
ActionModeHelper.ActionItemClickedListener actionItemClickedListener)
public ActionModeHelper(<any> fastAdapter,
int cabMenu,
ActionMode.Callback callback)
public ActionModeHelper<Item> withTitleProvider(ActionModeHelper.ActionModeTitleProvider titleProvider)
public ActionModeHelper<Item> withAutoDeselect(boolean enabled)
@Deprecated public ActionModeHelper<Item> withSupportSubItems(ExpandableExtension expandableExtension)
expandableExtension - public ActionMode getActionMode()
public boolean isActive()
public java.lang.Boolean onClick(IItem item)
item - the current itempublic java.lang.Boolean onClick(AppCompatActivity act,
IItem item)
act - the current Activityitem - the current itempublic ActionMode onLongClick(AppCompatActivity act,
int position)
act - the current Activityposition - the position of the clicked itempublic ActionMode checkActionMode(AppCompatActivity act)
act - the current Activitypublic void reset()