public abstract class ActionMode extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ActionMode.Callback
Callback interface for action modes.
|
Constructor and Description |
---|
ActionMode() |
Modifier and Type | Method and Description |
---|---|
abstract void |
finish()
Finish and close this action mode.
|
abstract android.view.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.
|
abstract void |
invalidate()
Invalidate the action mode and refresh menu content.
|
boolean |
isUiFocusable()
Returns whether the UI presenting this action mode can take focus or not.
|
abstract void |
setCustomView(android.view.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.
|
abstract void |
setTitle(CharSequence title)
Set the title of the action mode.
|
abstract void |
setTitle(int resId)
Set the title of the action mode.
|
public void setTag(Object tag)
Like the tag available to views, this allows applications to associate arbitrary data with an ActionMode for later reference.
tag
- Tag to associate with this ActionModegetTag()
public Object getTag()
Like the tag available to views, this allows applications to associate arbitrary data with an ActionMode for later reference.
setTag(Object)
public abstract void setTitle(CharSequence title)
title
- Title string to setsetTitle(int)
,
setCustomView(View)
public abstract void setTitle(int resId)
resId
- Resource ID of a string to set as the titlesetTitle(CharSequence)
,
setCustomView(View)
public abstract void setSubtitle(CharSequence subtitle)
subtitle
- Subtitle string to setsetSubtitle(int)
,
setCustomView(View)
public abstract void setSubtitle(int resId)
resId
- Resource ID of a string to set as the subtitlesetSubtitle(CharSequence)
,
setCustomView(View)
public abstract void setCustomView(android.view.View view)
view
- Custom view to use in place of the title/subtitle.setTitle(CharSequence)
,
setSubtitle(CharSequence)
public abstract void invalidate()
ActionMode.Callback
will have its
ActionMode.Callback.onPrepareActionMode(ActionMode, Menu)
method called.
If it returns true the menu will be scanned for updated content and any relevant changes
will be reflected to the user.public abstract void finish()
ActionMode.Callback
will
have its ActionMode.Callback.onDestroyActionMode(ActionMode)
method called.public abstract Menu getMenu()
public abstract CharSequence getTitle()
public abstract CharSequence getSubtitle()
public abstract android.view.View getCustomView()
public abstract MenuInflater getMenuInflater()
MenuInflater
with the ActionMode's context.public boolean isUiFocusable()
Copyright © 2011–2014. All rights reserved.