ActionMode

public abstract class ActionMode
extends Object

java.lang.Object
   ↳ androidx.appcompat.view.ActionMode


Represents a contextual mode of the user interface. Action modes can be used to provide alternative interaction modes and replace parts of the normal UI until finished. Examples of good action modes include text selection and contextual actions.

Developer Guides

For information about how to provide contextual actions with ActionMode, read the Menus developer guide.

Summary

Nested classes

interface ActionMode.Callback

Callback interface for action modes. 

Public constructors

ActionMode()

Public methods

abstract void finish()

Finish and close this action mode.

abstract View getCustomView()

Returns the current custom view for this action mode.

abstract Menu getMenu()

Returns the menu of actions that this action mode presents.

abstract MenuInflater getMenuInflater()

Returns a MenuInflater with the ActionMode's context.

abstract CharSequence getSubtitle()

Returns the current subtitle of this action mode.

Object getTag()

Retrieve the tag object associated with this ActionMode.

abstract CharSequence getTitle()

Returns the current title of this action mode.

boolean getTitleOptionalHint()
abstract void invalidate()

Invalidate the action mode and refresh menu content.

boolean isTitleOptional()
abstract void setCustomView(View view)

Set a custom view for this action mode.

abstract void setSubtitle(CharSequence subtitle)

Set the subtitle of the action mode.

abstract void setSubtitle(int resId)

Set the subtitle of the action mode.

void setTag(Object tag)

Set a tag object associated with this ActionMode.