Loading core/java/com/android/internal/view/StandaloneActionMode.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -87,7 +87,6 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call mFinished = true; mFinished = true; mCallback.onDestroyActionMode(this); mCallback.onDestroyActionMode(this); mContextView.setVisibility(View.GONE); } } @Override @Override Loading core/java/com/android/internal/widget/ActionBarContextView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -213,7 +213,7 @@ public class ActionBarContextView extends ViewGroup { } } final int heightMode = MeasureSpec.getMode(heightMeasureSpec); final int heightMode = MeasureSpec.getMode(heightMeasureSpec); if (heightMode != MeasureSpec.AT_MOST) { if (heightMode == MeasureSpec.UNSPECIFIED) { throw new IllegalStateException(getClass().getSimpleName() + " can only be used " + throw new IllegalStateException(getClass().getSimpleName() + " can only be used " + "with android:layout_height=\"wrap_content\""); "with android:layout_height=\"wrap_content\""); } } Loading core/res/res/values/themes.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1143,6 +1143,7 @@ <item name="android:windowAnimationStyle">@android:style/Animation.Holo.Dialog</item> <item name="android:windowAnimationStyle">@android:style/Animation.Holo.Dialog</item> <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> <item name="android:windowActionBar">false</item> <item name="android:windowActionBar">false</item> <item name="android:windowActionModeOverlay">true</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="android:colorBackgroundCacheHint">@null</item> Loading policy/src/com/android/internal/policy/impl/PhoneWindow.java +24 −3 Original line number Original line Diff line number Diff line Loading @@ -58,6 +58,7 @@ import android.util.Config; import android.util.EventLog; import android.util.EventLog; import android.util.Log; import android.util.Log; import android.util.SparseArray; import android.util.SparseArray; import android.util.TypedValue; import android.view.ActionMode; import android.view.ActionMode; import android.view.Gravity; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.HapticFeedbackConstants; Loading @@ -83,6 +84,7 @@ import android.view.animation.AnimationUtils; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager; import android.widget.FrameLayout; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.ImageView; import android.widget.PopupWindow; import android.widget.ProgressBar; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.TextView; Loading Loading @@ -1700,6 +1702,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { private ActionMode mActionMode; private ActionMode mActionMode; private ActionBarContextView mActionModeView; private ActionBarContextView mActionModeView; private PopupWindow mActionModePopup; public DecorView(Context context, int featureId) { public DecorView(Context context, int featureId) { super(context); super(context); Loading Loading @@ -2019,9 +2022,18 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (mActionModeView == null) { if (mActionModeView == null) { if (hasFeature(FEATURE_ACTION_MODE_OVERLAY)) { if (hasFeature(FEATURE_ACTION_MODE_OVERLAY)) { mActionModeView = new ActionBarContextView(mContext); mActionModeView = new ActionBarContextView(mContext); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( mActionModePopup = new PopupWindow(mContext); MATCH_PARENT, WRAP_CONTENT); mActionModePopup.setLayoutInScreenEnabled(true); addView(mActionModeView, params); mActionModePopup.setClippingEnabled(false); mActionModePopup.setContentView(mActionModeView); mActionModePopup.setWidth(MATCH_PARENT); TypedValue heightValue = new TypedValue(); mContext.getTheme().resolveAttribute( com.android.internal.R.attr.actionBarSize, heightValue, false); final int height = TypedValue.complexToDimensionPixelSize(heightValue.data, mContext.getResources().getDisplayMetrics()); mActionModePopup.setHeight(height); } else { } else { ViewStub stub = (ViewStub) findViewById( ViewStub stub = (ViewStub) findViewById( com.android.internal.R.id.action_mode_bar_stub); com.android.internal.R.id.action_mode_bar_stub); Loading @@ -2038,6 +2050,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { mActionModeView.initForMode(mode); mActionModeView.initForMode(mode); mActionModeView.setVisibility(View.VISIBLE); mActionModeView.setVisibility(View.VISIBLE); mActionMode = mode; mActionMode = mode; if (mActionModePopup != null) { mActionModePopup.showAtLocation(this, Gravity.TOP | Gravity.FILL_HORIZONTAL, 0, 0); } } else { } else { mActionMode = null; mActionMode = null; } } Loading Loading @@ -2250,6 +2266,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { public void onDestroyActionMode(ActionMode mode) { public void onDestroyActionMode(ActionMode mode) { mWrapped.onDestroyActionMode(mode); mWrapped.onDestroyActionMode(mode); if (mActionModePopup != null) { mActionModePopup.dismiss(); } else if (mActionModeView != null) { mActionModeView.setVisibility(GONE); } if (mActionModeView != null) { if (mActionModeView != null) { mActionModeView.removeAllViews(); mActionModeView.removeAllViews(); } } Loading Loading
core/java/com/android/internal/view/StandaloneActionMode.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -87,7 +87,6 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call mFinished = true; mFinished = true; mCallback.onDestroyActionMode(this); mCallback.onDestroyActionMode(this); mContextView.setVisibility(View.GONE); } } @Override @Override Loading
core/java/com/android/internal/widget/ActionBarContextView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -213,7 +213,7 @@ public class ActionBarContextView extends ViewGroup { } } final int heightMode = MeasureSpec.getMode(heightMeasureSpec); final int heightMode = MeasureSpec.getMode(heightMeasureSpec); if (heightMode != MeasureSpec.AT_MOST) { if (heightMode == MeasureSpec.UNSPECIFIED) { throw new IllegalStateException(getClass().getSimpleName() + " can only be used " + throw new IllegalStateException(getClass().getSimpleName() + " can only be used " + "with android:layout_height=\"wrap_content\""); "with android:layout_height=\"wrap_content\""); } } Loading
core/res/res/values/themes.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1143,6 +1143,7 @@ <item name="android:windowAnimationStyle">@android:style/Animation.Holo.Dialog</item> <item name="android:windowAnimationStyle">@android:style/Animation.Holo.Dialog</item> <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> <item name="android:windowActionBar">false</item> <item name="android:windowActionBar">false</item> <item name="android:windowActionModeOverlay">true</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="android:colorBackgroundCacheHint">@null</item> Loading
policy/src/com/android/internal/policy/impl/PhoneWindow.java +24 −3 Original line number Original line Diff line number Diff line Loading @@ -58,6 +58,7 @@ import android.util.Config; import android.util.EventLog; import android.util.EventLog; import android.util.Log; import android.util.Log; import android.util.SparseArray; import android.util.SparseArray; import android.util.TypedValue; import android.view.ActionMode; import android.view.ActionMode; import android.view.Gravity; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.HapticFeedbackConstants; Loading @@ -83,6 +84,7 @@ import android.view.animation.AnimationUtils; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager; import android.widget.FrameLayout; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.ImageView; import android.widget.PopupWindow; import android.widget.ProgressBar; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.TextView; Loading Loading @@ -1700,6 +1702,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { private ActionMode mActionMode; private ActionMode mActionMode; private ActionBarContextView mActionModeView; private ActionBarContextView mActionModeView; private PopupWindow mActionModePopup; public DecorView(Context context, int featureId) { public DecorView(Context context, int featureId) { super(context); super(context); Loading Loading @@ -2019,9 +2022,18 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (mActionModeView == null) { if (mActionModeView == null) { if (hasFeature(FEATURE_ACTION_MODE_OVERLAY)) { if (hasFeature(FEATURE_ACTION_MODE_OVERLAY)) { mActionModeView = new ActionBarContextView(mContext); mActionModeView = new ActionBarContextView(mContext); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( mActionModePopup = new PopupWindow(mContext); MATCH_PARENT, WRAP_CONTENT); mActionModePopup.setLayoutInScreenEnabled(true); addView(mActionModeView, params); mActionModePopup.setClippingEnabled(false); mActionModePopup.setContentView(mActionModeView); mActionModePopup.setWidth(MATCH_PARENT); TypedValue heightValue = new TypedValue(); mContext.getTheme().resolveAttribute( com.android.internal.R.attr.actionBarSize, heightValue, false); final int height = TypedValue.complexToDimensionPixelSize(heightValue.data, mContext.getResources().getDisplayMetrics()); mActionModePopup.setHeight(height); } else { } else { ViewStub stub = (ViewStub) findViewById( ViewStub stub = (ViewStub) findViewById( com.android.internal.R.id.action_mode_bar_stub); com.android.internal.R.id.action_mode_bar_stub); Loading @@ -2038,6 +2050,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { mActionModeView.initForMode(mode); mActionModeView.initForMode(mode); mActionModeView.setVisibility(View.VISIBLE); mActionModeView.setVisibility(View.VISIBLE); mActionMode = mode; mActionMode = mode; if (mActionModePopup != null) { mActionModePopup.showAtLocation(this, Gravity.TOP | Gravity.FILL_HORIZONTAL, 0, 0); } } else { } else { mActionMode = null; mActionMode = null; } } Loading Loading @@ -2250,6 +2266,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { public void onDestroyActionMode(ActionMode mode) { public void onDestroyActionMode(ActionMode mode) { mWrapped.onDestroyActionMode(mode); mWrapped.onDestroyActionMode(mode); if (mActionModePopup != null) { mActionModePopup.dismiss(); } else if (mActionModeView != null) { mActionModeView.setVisibility(GONE); } if (mActionModeView != null) { if (mActionModeView != null) { mActionModeView.removeAllViews(); mActionModeView.removeAllViews(); } } Loading