public class ActionModeHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ActionModeHelper.ActionModeTitleProvider |
| Constructor and Description |
|---|
ActionModeHelper(com.mikepenz.fastadapter.FastAdapter fastAdapter,
int cabMenu) |
ActionModeHelper(com.mikepenz.fastadapter.FastAdapter fastAdapter,
int cabMenu,
android.support.v7.view.ActionMode.Callback callback) |
| Modifier and Type | Method and Description |
|---|---|
android.support.v7.view.ActionMode |
checkActionMode(android.support.v7.app.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
|
android.support.v7.view.ActionMode |
getActionMode() |
boolean |
isActive()
convenient method to check if action mode is active or nor
|
java.lang.Boolean |
onClick(android.support.v7.app.AppCompatActivity act,
com.mikepenz.fastadapter.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(com.mikepenz.fastadapter.IItem item)
implements the basic behavior of a CAB and multi select behavior,
including logics if the clicked item is collapsible
|
android.support.v7.view.ActionMode |
onLongClick(android.support.v7.app.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 |
withAutoDeselect(boolean enabled) |
ActionModeHelper |
withSupportSubItems(com.mikepenz.fastadapter.expandable.ExpandableExtension expandableExtension)
Deprecated.
|
ActionModeHelper |
withTitleProvider(ActionModeHelper.ActionModeTitleProvider titleProvider) |
public ActionModeHelper(com.mikepenz.fastadapter.FastAdapter fastAdapter,
int cabMenu)
public ActionModeHelper(com.mikepenz.fastadapter.FastAdapter fastAdapter,
int cabMenu,
android.support.v7.view.ActionMode.Callback callback)
public ActionModeHelper withTitleProvider(ActionModeHelper.ActionModeTitleProvider titleProvider)
public ActionModeHelper withAutoDeselect(boolean enabled)
@Deprecated public ActionModeHelper withSupportSubItems(com.mikepenz.fastadapter.expandable.ExpandableExtension expandableExtension)
expandableExtension - public android.support.v7.view.ActionMode getActionMode()
public boolean isActive()
public java.lang.Boolean onClick(com.mikepenz.fastadapter.IItem item)
item - the current itempublic java.lang.Boolean onClick(android.support.v7.app.AppCompatActivity act,
com.mikepenz.fastadapter.IItem item)
act - the current Activityitem - the current itempublic android.support.v7.view.ActionMode onLongClick(android.support.v7.app.AppCompatActivity act,
int position)
act - the current Activityposition - the position of the clicked itempublic android.support.v7.view.ActionMode checkActionMode(android.support.v7.app.AppCompatActivity act)
act - the current Activitypublic void reset()