diff options
author | Adam Powell <adamp@google.com> | 2011-07-18 19:40:17 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-18 19:40:17 -0700 |
commit | 32910e722b5760099962850858a2cca07a111c6d (patch) | |
tree | 7b8cca8892fa341a9453b74c66d4960a7df8c613 /core/java/android | |
parent | 2d6080df999d405c353b0196b146163dc4cbee9a (diff) | |
parent | f178737f823cf22d9a07df6f51071b7189a95e7e (diff) | |
download | frameworks_base-32910e722b5760099962850858a2cca07a111c6d.zip frameworks_base-32910e722b5760099962850858a2cca07a111c6d.tar.gz frameworks_base-32910e722b5760099962850858a2cca07a111c6d.tar.bz2 |
Merge "Fix bug 5031652 - offer a way to associate metadata with an ActionMode"
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/view/ActionMode.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/core/java/android/view/ActionMode.java b/core/java/android/view/ActionMode.java index bfafa98..e954983 100644 --- a/core/java/android/view/ActionMode.java +++ b/core/java/android/view/ActionMode.java @@ -23,6 +23,36 @@ package android.view; * Examples of good action modes include selection modes, search, content editing, etc. */ public abstract class ActionMode { + private Object mTag; + + /** + * Set a tag object associated with this ActionMode. + * + * <p>Like the tag available to views, this allows applications to associate arbitrary + * data with an ActionMode for later reference. + * + * @param tag Tag to associate with this ActionMode + * + * @see #getTag() + */ + public void setTag(Object tag) { + mTag = tag; + } + + /** + * Retrieve the tag object associated with this ActionMode. + * + * <p>Like the tag available to views, this allows applications to associate arbitrary + * data with an ActionMode for later reference. + * + * @return Tag associated with this ActionMode + * + * @see #setTag(Object) + */ + public Object getTag() { + return mTag; + } + /** * Set the title of the action mode. This method will have no visible effect if * a custom view has been set. |