Fix bug 3105695 - Action modes in dialogs or other small windows

Overlay action modes now show in their own windows aligned to the top
of the screen.

Change-Id: I81600bbd1bcaeb59fdcf0a959bd35f82165baa2c
This commit is contained in:
Adam Powell
2010-10-22 17:43:56 -07:00
parent dca9cd6dd0
commit 85446e95af
4 changed files with 26 additions and 5 deletions

View File

@@ -87,7 +87,6 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call
mFinished = true;
mCallback.onDestroyActionMode(this);
mContextView.setVisibility(View.GONE);
}
@Override

View File

@@ -213,7 +213,7 @@ public class ActionBarContextView extends ViewGroup {
}
final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
if (heightMode != MeasureSpec.AT_MOST) {
if (heightMode == MeasureSpec.UNSPECIFIED) {
throw new IllegalStateException(getClass().getSimpleName() + " can only be used " +
"with android:layout_height=\"wrap_content\"");
}