Merge "JB API cleanup; ActionMode and View docs" into jb-dev
This commit is contained in:
@@ -22539,6 +22539,7 @@ package android.view {
|
||||
method public abstract java.lang.CharSequence getSubtitle();
|
||||
method public java.lang.Object getTag();
|
||||
method public abstract java.lang.CharSequence getTitle();
|
||||
method public boolean getTitleOptionalHint();
|
||||
method public abstract void invalidate();
|
||||
method public boolean isTitleOptional();
|
||||
method public abstract void setCustomView(android.view.View);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -817,6 +817,7 @@ public class ActionBarImpl extends ActionBar {
|
||||
|
||||
@Override
|
||||
public void setTitleOptionalHint(boolean titleOptional) {
|
||||
super.setTitleOptionalHint(titleOptional);
|
||||
mContextView.setTitleOptional(titleOptional);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call
|
||||
|
||||
@Override
|
||||
public void setTitleOptionalHint(boolean titleOptional) {
|
||||
super.setTitleOptionalHint(titleOptional);
|
||||
mContextView.setTitleOptional(titleOptional);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user