Methods Summary |
---|
public abstract void | finish()Finish and close this action mode. The action mode's {@link ActionMode.Callback} will
have its {@link Callback#onDestroyActionMode(ActionMode)} method called.
|
public abstract View | getCustomView()Returns the current custom view for this action mode.
|
public abstract Menu | getMenu()Returns the menu of actions that this action mode presents.
|
public abstract MenuInflater | getMenuInflater()Returns a {@link MenuInflater} with the ActionMode's context.
|
public abstract java.lang.CharSequence | getSubtitle()Returns the current subtitle of this action mode.
|
public java.lang.Object | getTag()Retrieve the tag object associated with this ActionMode.
Like the tag available to views, this allows applications to associate arbitrary
data with an ActionMode for later reference.
return mTag;
|
public abstract java.lang.CharSequence | getTitle()Returns the current title of this action mode.
|
public boolean | getTitleOptionalHint()
return mTitleOptionalHint;
|
public abstract void | invalidate()Invalidate the action mode and refresh menu content. The mode's
{@link ActionMode.Callback} will have its
{@link 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 boolean | isTitleOptional()
return false;
|
public boolean | isUiFocusable()Returns whether the UI presenting this action mode can take focus or not.
This is used by internal components within the framework that would otherwise
present an action mode UI that requires focus, such as an EditText as a custom view.
return true;
|
public abstract void | setCustomView(View view)Set a custom view for this action mode. The custom view will take the place of
the title and subtitle. Useful for things like search boxes.
|
public abstract void | setSubtitle(java.lang.CharSequence subtitle)Set the subtitle of the action mode. This method will have no visible effect if
a custom view has been set.
|
public abstract void | setSubtitle(int resId)Set the subtitle of the action mode. This method will have no visible effect if
a custom view has been set.
|
public void | setTag(java.lang.Object tag)Set a tag object associated with this ActionMode.
Like the tag available to views, this allows applications to associate arbitrary
data with an ActionMode for later reference.
mTag = tag;
|
public abstract void | setTitle(java.lang.CharSequence title)Set the title of the action mode. This method will have no visible effect if
a custom view has been set.
|
public abstract void | setTitle(int resId)Set the title of the action mode. This method will have no visible effect if
a custom view has been set.
|
public void | setTitleOptionalHint(boolean titleOptional)Set whether or not the title/subtitle display for this action mode
is optional.
In many cases the supplied title for an action mode is merely
meant to add context and is not strictly required for the action
mode to be useful. If the title is optional, the system may choose
to hide the title entirely rather than truncate it due to a lack
of available space.
Note that this is merely a hint; the underlying implementation
may choose to ignore this setting under some circumstances.
mTitleOptionalHint = titleOptional;
|