Loading api/current.xml +45 −23 Original line number Diff line number Diff line Loading @@ -2088,55 +2088,55 @@ visibility="public" > </field> <field name="actionBarCloseContextDrawable" <field name="actionButtonPadding" type="int" transient="false" volatile="false" value="16843550" value="16843547" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="actionBarContextBackground" <field name="actionButtonStyle" type="int" transient="false" volatile="false" value="16843549" value="16843545" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="actionButtonPadding" <field name="actionDropDownStyle" type="int" transient="false" volatile="false" value="16843547" value="16843544" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="actionButtonStyle" <field name="actionModeBackground" type="int" transient="false" volatile="false" value="16843545" value="16843549" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="actionDropDownStyle" <field name="actionModeCloseDrawable" type="int" transient="false" volatile="false" value="16843544" value="16843550" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -10525,6 +10525,17 @@ visibility="public" > </field> <field name="windowActionModeOverlay" type="int" transient="false" volatile="false" value="16843551" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="windowAnimationStyle" type="int" transient="false" Loading Loading @@ -21849,6 +21860,19 @@ <parameter name="args" type="android.os.Bundle"> </parameter> </method> <method name="startActionMode" return="android.view.ActionMode" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="callback" type="android.view.ActionMode.Callback"> </parameter> </method> <method name="startActivityForResult" return="void" abstract="false" Loading Loading @@ -21913,19 +21937,6 @@ <parameter name="requestCode" type="int"> </parameter> </method> <method name="startContextMode" return="android.view.ActionMode" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="callback" type="android.view.ActionMode.Callback"> </parameter> </method> <method name="startIntentSenderForResult" return="void" abstract="false" Loading Loading @@ -194328,6 +194339,17 @@ > </field> <field name="FEATURE_ACTION_BAR" type="int" transient="false" volatile="false" value="8" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="FEATURE_ACTION_MODE_OVERLAY" type="int" transient="false" volatile="false" core/java/android/app/Activity.java +2 −2 Original line number Diff line number Diff line Loading @@ -4080,13 +4080,13 @@ public class Activity extends ContextThemeWrapper * * @see ActionMode */ public ActionMode startContextMode(ActionMode.Callback callback) { public ActionMode startActionMode(ActionMode.Callback callback) { return mWindow.getDecorView().startActionMode(callback); } public ActionMode onStartActionMode(ActionMode.Callback callback) { if (mActionBar != null) { return mActionBar.startContextMode(callback); return mActionBar.startActionMode(callback); } return null; } Loading core/java/android/view/MenuInflater.java +4 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,10 @@ public class MenuInflater { .setShowAsAction(itemShowAsAction); if (itemListenerMethodName != null) { if (mContext.isRestricted()) { throw new IllegalStateException("The android:onClick attribute cannot " + "be used within a restricted context"); } item.setOnMenuItemClickListener( new InflatedOnMenuItemClickListener(mContext, itemListenerMethodName)); } Loading core/java/android/view/Window.java +6 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,12 @@ public abstract class Window { * replaces the title bar and provides an alternate location * for an on-screen menu button on some devices. */ public static final int FEATURE_ACTION_BAR = 9; public static final int FEATURE_ACTION_BAR = 8; /** * Flag for specifying the behavior of action modes when an Action Bar is not present. * If overlay is enabled, the action mode UI will be allowed to cover existing window content. */ public static final int FEATURE_ACTION_MODE_OVERLAY = 9; /** Flag for setting the progress bar's visibility to VISIBLE */ public static final int PROGRESS_VISIBILITY_ON = -1; /** Flag for setting the progress bar's visibility to GONE */ Loading core/java/com/android/internal/app/ActionBarImpl.java +11 −11 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ public class ActionBarImpl extends ActionBar { private TabImpl mSelectedTab; private int mTabSwitchMode = TAB_SWITCH_ADD_REMOVE; private ActionMode mContextMode; private ActionMode mActionMode; private static final int CONTEXT_DISPLAY_NORMAL = 0; private static final int CONTEXT_DISPLAY_SPLIT = 1; Loading Loading @@ -229,9 +229,9 @@ public class ActionBarImpl extends ActionBar { return mActionView.getDisplayOptions(); } public ActionMode startContextMode(ActionMode.Callback callback) { if (mContextMode != null) { mContextMode.finish(); public ActionMode startActionMode(ActionMode.Callback callback) { if (mActionMode != null) { mActionMode.finish(); } // Don't wait for the close context mode animation to finish. Loading @@ -241,7 +241,7 @@ public class ActionBarImpl extends ActionBar { mCloseContext.run(); } ActionMode mode = new ContextModeImpl(callback); ActionMode mode = new ActionModeImpl(callback); if (callback.onCreateActionMode(mode, mode.getMenu())) { mode.invalidate(); mUpperContextView.initForMode(mode); Loading @@ -250,7 +250,7 @@ public class ActionBarImpl extends ActionBar { // TODO animate this mLowerContextView.setVisibility(View.VISIBLE); } mContextMode = mode; mActionMode = mode; return mode; } return null; Loading Loading @@ -361,12 +361,12 @@ public class ActionBarImpl extends ActionBar { /** * @hide */ public class ContextModeImpl extends ActionMode implements MenuBuilder.Callback { public class ActionModeImpl extends ActionMode implements MenuBuilder.Callback { private ActionMode.Callback mCallback; private MenuBuilder mMenu; private WeakReference<View> mCustomView; public ContextModeImpl(ActionMode.Callback callback) { public ActionModeImpl(ActionMode.Callback callback) { mCallback = callback; mMenu = new MenuBuilder(mActionView.getContext()); mMenu.setCallback(this); Loading @@ -379,8 +379,8 @@ public class ActionBarImpl extends ActionBar { @Override public void finish() { if (mContextMode != this) { // Not the active context mode - no-op if (mActionMode != this) { // Not the active action mode - no-op return; } Loading @@ -395,7 +395,7 @@ public class ActionBarImpl extends ActionBar { // TODO Animate this mLowerContextView.setVisibility(View.GONE); } mContextMode = null; mActionMode = null; } @Override Loading Loading
api/current.xml +45 −23 Original line number Diff line number Diff line Loading @@ -2088,55 +2088,55 @@ visibility="public" > </field> <field name="actionBarCloseContextDrawable" <field name="actionButtonPadding" type="int" transient="false" volatile="false" value="16843550" value="16843547" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="actionBarContextBackground" <field name="actionButtonStyle" type="int" transient="false" volatile="false" value="16843549" value="16843545" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="actionButtonPadding" <field name="actionDropDownStyle" type="int" transient="false" volatile="false" value="16843547" value="16843544" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="actionButtonStyle" <field name="actionModeBackground" type="int" transient="false" volatile="false" value="16843545" value="16843549" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="actionDropDownStyle" <field name="actionModeCloseDrawable" type="int" transient="false" volatile="false" value="16843544" value="16843550" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -10525,6 +10525,17 @@ visibility="public" > </field> <field name="windowActionModeOverlay" type="int" transient="false" volatile="false" value="16843551" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="windowAnimationStyle" type="int" transient="false" Loading Loading @@ -21849,6 +21860,19 @@ <parameter name="args" type="android.os.Bundle"> </parameter> </method> <method name="startActionMode" return="android.view.ActionMode" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="callback" type="android.view.ActionMode.Callback"> </parameter> </method> <method name="startActivityForResult" return="void" abstract="false" Loading Loading @@ -21913,19 +21937,6 @@ <parameter name="requestCode" type="int"> </parameter> </method> <method name="startContextMode" return="android.view.ActionMode" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="callback" type="android.view.ActionMode.Callback"> </parameter> </method> <method name="startIntentSenderForResult" return="void" abstract="false" Loading Loading @@ -194328,6 +194339,17 @@ > </field> <field name="FEATURE_ACTION_BAR" type="int" transient="false" volatile="false" value="8" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="FEATURE_ACTION_MODE_OVERLAY" type="int" transient="false" volatile="false"
core/java/android/app/Activity.java +2 −2 Original line number Diff line number Diff line Loading @@ -4080,13 +4080,13 @@ public class Activity extends ContextThemeWrapper * * @see ActionMode */ public ActionMode startContextMode(ActionMode.Callback callback) { public ActionMode startActionMode(ActionMode.Callback callback) { return mWindow.getDecorView().startActionMode(callback); } public ActionMode onStartActionMode(ActionMode.Callback callback) { if (mActionBar != null) { return mActionBar.startContextMode(callback); return mActionBar.startActionMode(callback); } return null; } Loading
core/java/android/view/MenuInflater.java +4 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,10 @@ public class MenuInflater { .setShowAsAction(itemShowAsAction); if (itemListenerMethodName != null) { if (mContext.isRestricted()) { throw new IllegalStateException("The android:onClick attribute cannot " + "be used within a restricted context"); } item.setOnMenuItemClickListener( new InflatedOnMenuItemClickListener(mContext, itemListenerMethodName)); } Loading
core/java/android/view/Window.java +6 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,12 @@ public abstract class Window { * replaces the title bar and provides an alternate location * for an on-screen menu button on some devices. */ public static final int FEATURE_ACTION_BAR = 9; public static final int FEATURE_ACTION_BAR = 8; /** * Flag for specifying the behavior of action modes when an Action Bar is not present. * If overlay is enabled, the action mode UI will be allowed to cover existing window content. */ public static final int FEATURE_ACTION_MODE_OVERLAY = 9; /** Flag for setting the progress bar's visibility to VISIBLE */ public static final int PROGRESS_VISIBILITY_ON = -1; /** Flag for setting the progress bar's visibility to GONE */ Loading
core/java/com/android/internal/app/ActionBarImpl.java +11 −11 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ public class ActionBarImpl extends ActionBar { private TabImpl mSelectedTab; private int mTabSwitchMode = TAB_SWITCH_ADD_REMOVE; private ActionMode mContextMode; private ActionMode mActionMode; private static final int CONTEXT_DISPLAY_NORMAL = 0; private static final int CONTEXT_DISPLAY_SPLIT = 1; Loading Loading @@ -229,9 +229,9 @@ public class ActionBarImpl extends ActionBar { return mActionView.getDisplayOptions(); } public ActionMode startContextMode(ActionMode.Callback callback) { if (mContextMode != null) { mContextMode.finish(); public ActionMode startActionMode(ActionMode.Callback callback) { if (mActionMode != null) { mActionMode.finish(); } // Don't wait for the close context mode animation to finish. Loading @@ -241,7 +241,7 @@ public class ActionBarImpl extends ActionBar { mCloseContext.run(); } ActionMode mode = new ContextModeImpl(callback); ActionMode mode = new ActionModeImpl(callback); if (callback.onCreateActionMode(mode, mode.getMenu())) { mode.invalidate(); mUpperContextView.initForMode(mode); Loading @@ -250,7 +250,7 @@ public class ActionBarImpl extends ActionBar { // TODO animate this mLowerContextView.setVisibility(View.VISIBLE); } mContextMode = mode; mActionMode = mode; return mode; } return null; Loading Loading @@ -361,12 +361,12 @@ public class ActionBarImpl extends ActionBar { /** * @hide */ public class ContextModeImpl extends ActionMode implements MenuBuilder.Callback { public class ActionModeImpl extends ActionMode implements MenuBuilder.Callback { private ActionMode.Callback mCallback; private MenuBuilder mMenu; private WeakReference<View> mCustomView; public ContextModeImpl(ActionMode.Callback callback) { public ActionModeImpl(ActionMode.Callback callback) { mCallback = callback; mMenu = new MenuBuilder(mActionView.getContext()); mMenu.setCallback(this); Loading @@ -379,8 +379,8 @@ public class ActionBarImpl extends ActionBar { @Override public void finish() { if (mContextMode != this) { // Not the active context mode - no-op if (mActionMode != this) { // Not the active action mode - no-op return; } Loading @@ -395,7 +395,7 @@ public class ActionBarImpl extends ActionBar { // TODO Animate this mLowerContextView.setVisibility(View.GONE); } mContextMode = null; mActionMode = null; } @Override Loading