Stay organized with collections
Save and categorize content based on your preferences.
AbsListView.MultiChoiceModeListener
public
static
interface
AbsListView.MultiChoiceModeListener
implements
ActionMode.Callback
android.widget.AbsListView.MultiChoiceModeListener
|
A MultiChoiceModeListener receives events for AbsListView.CHOICE_MODE_MULTIPLE_MODAL
.
It acts as the ActionMode.Callback
for the selection mode and also receives
onItemCheckedStateChanged(android.view.ActionMode, int, long, boolean)
events when the user
selects and deselects list items.
Summary
Public methods |
abstract
void
|
onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked)
Called when an item is checked or unchecked during selection mode.
|
Public methods
onItemCheckedStateChanged
public abstract void onItemCheckedStateChanged (ActionMode mode,
int position,
long id,
boolean checked)
Called when an item is checked or unchecked during selection mode.
Parameters |
mode |
ActionMode : The ActionMode providing the selection mode |
position |
int : Adapter position of the item that was checked or unchecked |
id |
long : Adapter ID of the item that was checked or unchecked |
checked |
boolean : true if the item is now checked, false
if the item is now unchecked. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AbsListView.MultiChoiceModeListener\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nAbsListView.MultiChoiceModeListener\n===================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/widget/AbsListView.MultiChoiceModeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nAbsListView.MultiChoiceModeListener\n`\n\n\n`\n\n\nimplements\n\n`[ActionMode.Callback](/reference/android/view/ActionMode.Callback)`\n\n\n`\n\n|----------------------------------------------------|\n| android.widget.AbsListView.MultiChoiceModeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA MultiChoiceModeListener receives events for [AbsListView.CHOICE_MODE_MULTIPLE_MODAL](/reference/android/widget/AbsListView#CHOICE_MODE_MULTIPLE_MODAL).\nIt acts as the [ActionMode.Callback](/reference/android/view/ActionMode.Callback) for the selection mode and also receives\n[onItemCheckedStateChanged(android.view.ActionMode, int, long, boolean)](/reference/android/widget/AbsListView.MultiChoiceModeListener#onItemCheckedStateChanged(android.view.ActionMode,%20int,%20long,%20boolean)) events when the user\nselects and deselects list items.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onItemCheckedStateChanged](/reference/android/widget/AbsListView.MultiChoiceModeListener#onItemCheckedStateChanged(android.view.ActionMode,%20int,%20long,%20boolean))`(`[ActionMode](/reference/android/view/ActionMode)` mode, int position, long id, boolean checked) ` Called when an item is checked or unchecked during selection mode. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[android.view.ActionMode.Callback](/reference/android/view/ActionMode.Callback)` ` |---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` `[onActionItemClicked](/reference/android/view/ActionMode.Callback#onActionItemClicked(android.view.ActionMode,%20android.view.MenuItem))`(`[ActionMode](/reference/android/view/ActionMode)` mode, `[MenuItem](/reference/android/view/MenuItem)` item) ` Called to report a user click on an action button. | | ` abstract boolean` | ` `[onCreateActionMode](/reference/android/view/ActionMode.Callback#onCreateActionMode(android.view.ActionMode,%20android.view.Menu))`(`[ActionMode](/reference/android/view/ActionMode)` mode, `[Menu](/reference/android/view/Menu)` menu) ` Called when action mode is first created. | | ` abstract void` | ` `[onDestroyActionMode](/reference/android/view/ActionMode.Callback#onDestroyActionMode(android.view.ActionMode))`(`[ActionMode](/reference/android/view/ActionMode)` mode) ` Called when an action mode is about to be exited and destroyed. | | ` abstract boolean` | ` `[onPrepareActionMode](/reference/android/view/ActionMode.Callback#onPrepareActionMode(android.view.ActionMode,%20android.view.Menu))`(`[ActionMode](/reference/android/view/ActionMode)` mode, `[Menu](/reference/android/view/Menu)` menu) ` Called to refresh an action mode's action menu whenever it is invalidated. | ||\n\nPublic methods\n--------------\n\n### onItemCheckedStateChanged\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onItemCheckedStateChanged (ActionMode mode, \n int position, \n long id, \n boolean checked)\n```\n\nCalled when an item is checked or unchecked during selection mode.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------|\n| `mode` | `ActionMode`: The [ActionMode](/reference/android/view/ActionMode) providing the selection mode \u003cbr /\u003e |\n| `position` | `int`: Adapter position of the item that was checked or unchecked \u003cbr /\u003e |\n| `id` | `long`: Adapter ID of the item that was checked or unchecked \u003cbr /\u003e |\n| `checked` | `boolean`: `true` if the item is now checked, `false` if the item is now unchecked. \u003cbr /\u003e |"]]