Loading api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -32452,6 +32452,7 @@ package android.view { method public java.lang.Object getTag(); method public abstract java.lang.CharSequence getTitle(); method public boolean getTitleOptionalHint(); method public int getType(); method public abstract void invalidate(); method public boolean isTitleOptional(); method public abstract void setCustomView(android.view.View); Loading @@ -32461,6 +32462,9 @@ package android.view { method public abstract void setTitle(java.lang.CharSequence); method public abstract void setTitle(int); method public void setTitleOptionalHint(boolean); method public void setType(int); field public static final int TYPE_FLOATING = 1; // 0x1 field public static final int TYPE_PRIMARY = 0; // 0x0 } public static abstract interface ActionMode.Callback { api/system-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -34654,6 +34654,7 @@ package android.view { method public java.lang.Object getTag(); method public abstract java.lang.CharSequence getTitle(); method public boolean getTitleOptionalHint(); method public int getType(); method public abstract void invalidate(); method public boolean isTitleOptional(); method public abstract void setCustomView(android.view.View); Loading @@ -34663,6 +34664,9 @@ package android.view { method public abstract void setTitle(java.lang.CharSequence); method public abstract void setTitle(int); method public void setTitleOptionalHint(boolean); method public void setType(int); field public static final int TYPE_FLOATING = 1; // 0x1 field public static final int TYPE_PRIMARY = 0; // 0x0 } public static abstract interface ActionMode.Callback { core/java/android/view/ActionMode.java +32 −0 Original line number Diff line number Diff line Loading @@ -29,8 +29,21 @@ package android.view; * </div> */ public abstract class ActionMode { /** * The action mode is treated as a Primary mode. This is the default. * Use with {@link #setType}. */ public static final int TYPE_PRIMARY = 0; /** * The action mode is treated as a Floating Toolbar. * Use with {@link #setType}. */ public static final int TYPE_FLOATING = 1; private Object mTag; private boolean mTitleOptionalHint; private int mType = TYPE_PRIMARY; /** * Set a tag object associated with this ActionMode. Loading Loading @@ -153,6 +166,25 @@ public abstract class ActionMode { */ public abstract void setCustomView(View view); /** * Set a type for this action mode. This will affect how the system renders the action mode if * it has to. * * @param type One of {@link #TYPE_PRIMARY} or {@link #TYPE_FLOATING}. */ public void setType(int type) { mType = type; } /** * Returns the type for this action mode. * * @return One of {@link #TYPE_PRIMARY} or {@link #TYPE_FLOATING}. */ public int getType() { return mType; } /** * Invalidate the action mode and refresh menu content. The mode's * {@link ActionMode.Callback} will have its Loading Loading
api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -32452,6 +32452,7 @@ package android.view { method public java.lang.Object getTag(); method public abstract java.lang.CharSequence getTitle(); method public boolean getTitleOptionalHint(); method public int getType(); method public abstract void invalidate(); method public boolean isTitleOptional(); method public abstract void setCustomView(android.view.View); Loading @@ -32461,6 +32462,9 @@ package android.view { method public abstract void setTitle(java.lang.CharSequence); method public abstract void setTitle(int); method public void setTitleOptionalHint(boolean); method public void setType(int); field public static final int TYPE_FLOATING = 1; // 0x1 field public static final int TYPE_PRIMARY = 0; // 0x0 } public static abstract interface ActionMode.Callback {
api/system-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -34654,6 +34654,7 @@ package android.view { method public java.lang.Object getTag(); method public abstract java.lang.CharSequence getTitle(); method public boolean getTitleOptionalHint(); method public int getType(); method public abstract void invalidate(); method public boolean isTitleOptional(); method public abstract void setCustomView(android.view.View); Loading @@ -34663,6 +34664,9 @@ package android.view { method public abstract void setTitle(java.lang.CharSequence); method public abstract void setTitle(int); method public void setTitleOptionalHint(boolean); method public void setType(int); field public static final int TYPE_FLOATING = 1; // 0x1 field public static final int TYPE_PRIMARY = 0; // 0x0 } public static abstract interface ActionMode.Callback {
core/java/android/view/ActionMode.java +32 −0 Original line number Diff line number Diff line Loading @@ -29,8 +29,21 @@ package android.view; * </div> */ public abstract class ActionMode { /** * The action mode is treated as a Primary mode. This is the default. * Use with {@link #setType}. */ public static final int TYPE_PRIMARY = 0; /** * The action mode is treated as a Floating Toolbar. * Use with {@link #setType}. */ public static final int TYPE_FLOATING = 1; private Object mTag; private boolean mTitleOptionalHint; private int mType = TYPE_PRIMARY; /** * Set a tag object associated with this ActionMode. Loading Loading @@ -153,6 +166,25 @@ public abstract class ActionMode { */ public abstract void setCustomView(View view); /** * Set a type for this action mode. This will affect how the system renders the action mode if * it has to. * * @param type One of {@link #TYPE_PRIMARY} or {@link #TYPE_FLOATING}. */ public void setType(int type) { mType = type; } /** * Returns the type for this action mode. * * @return One of {@link #TYPE_PRIMARY} or {@link #TYPE_FLOATING}. */ public int getType() { return mType; } /** * Invalidate the action mode and refresh menu content. The mode's * {@link ActionMode.Callback} will have its Loading