summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2012-05-03 10:58:48 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-03 10:58:48 -0700
commitf27ba974d5af68baf071282de65a22ca6e59244c (patch)
tree916ca8dcbf9395e56f40283f417c0c7b838ea9d5 /core/java/android
parent1f2077c3a0ae20caa4343dc9f66db959a939a054 (diff)
parent785c447b2bc625209706fd128ce61781c3a4183b (diff)
Merge "JB API cleanup; ActionMode and View docs" into jb-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/ActionMode.java13
-rw-r--r--core/java/android/view/View.java10
2 files changed, 23 insertions, 0 deletions
diff --git a/core/java/android/view/ActionMode.java b/core/java/android/view/ActionMode.java
index 0ba5fdbc4f1a..a359952ddcf2 100644
--- a/core/java/android/view/ActionMode.java
+++ b/core/java/android/view/ActionMode.java
@@ -30,6 +30,7 @@ package android.view;
*/
public abstract class ActionMode {
private Object mTag;
+ private boolean mTitleOptionalHint;
/**
* Set a tag object associated with this ActionMode.
@@ -119,6 +120,18 @@ public abstract class ActionMode {
* @param titleOptional true if the title only presents optional information.
*/
public void setTitleOptionalHint(boolean titleOptional) {
+ mTitleOptionalHint = titleOptional;
+ }
+
+ /**
+ * @return true if this action mode has been given a hint to consider the
+ * title/subtitle display to be optional.
+ *
+ * @see #setTitleOptionalHint(boolean)
+ * @see #isTitleOptional()
+ */
+ public boolean getTitleOptionalHint() {
+ return mTitleOptionalHint;
}
/**
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 092bcbd4b4ef..2f67481aba22 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -5423,6 +5423,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* app should not need to concern itself with saving and restoring, but that
* the framework should take special note to preserve when possible.
*
+ * <p>A view with transient state cannot be trivially rebound from an external
+ * data source, such as an adapter binding item views in a list. This may be
+ * because the view is performing an animation, tracking user selection
+ * of content, or similar.</p>
+ *
* @return true if the view has transient state
*/
@ViewDebug.ExportedProperty(category = "layout")
@@ -5436,6 +5441,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* so every call to setHasTransientState(true) should be paired with a later call
* to setHasTransientState(false).
*
+ * <p>A view with transient state cannot be trivially rebound from an external
+ * data source, such as an adapter binding item views in a list. This may be
+ * because the view is performing an animation, tracking user selection
+ * of content, or similar.</p>
+ *
* @param hasTransientState true if this view has transient state
*/
public void setHasTransientState(boolean hasTransientState) {