Merge "Fix bug 5133509 - Align holo menu panel windows along the bottom of the screen"

This commit is contained in:
Adam Powell
2011-08-28 16:58:27 -07:00
committed by Android (Google) Code Review
9 changed files with 10 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

View File

@@ -163,6 +163,8 @@
<item>@drawable/list_selector_holo_light</item>
<item>@drawable/menu_background</item>
<item>@drawable/menu_background_fill_parent_width</item>
<item>@drawable/menu_hardkey_panel_holo_dark</item>
<item>@drawable/menu_hardkey_panel_holo_light</item>
<item>@drawable/menu_submenu_background</item>
<item>@drawable/menu_selector</item>
<item>@drawable/overscroll_edge</item>

View File

@@ -980,7 +980,7 @@ please see themes_device_defaults.xml.
<item name="toastFrameBackground">@android:drawable/toast_frame_holo</item>
<!-- Panel attributes -->
<item name="panelBackground">@android:drawable/menu_dropdown_panel_holo_dark</item>
<item name="panelBackground">@android:drawable/menu_hardkey_panel_holo_dark</item>
<item name="panelFullBackground">@android:drawable/menu_background_fill_parent_width</item>
<!-- These three attributes do not seems to be used by the framework. Declared public though -->
<item name="panelColorBackground">#000</item>
@@ -1283,7 +1283,7 @@ please see themes_device_defaults.xml.
<item name="toastFrameBackground">@android:drawable/toast_frame_holo</item>
<!-- Panel attributes -->
<item name="panelBackground">@android:drawable/menu_dropdown_panel_holo_light</item>
<item name="panelBackground">@android:drawable/menu_hardkey_panel_holo_light</item>
<item name="panelFullBackground">@android:drawable/menu_background_fill_parent_width</item>
<!-- These three attributes do not seems to be used by the framework. Declared public though -->
<item name="panelColorBackground">#000</item>

View File

@@ -5291,24 +5291,24 @@ public class WindowManagerService extends IWindowManager.Stub
case Surface.ROTATION_0:
return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
case Surface.ROTATION_90:
return Gravity.RIGHT | Gravity.CENTER_VERTICAL;
return Gravity.RIGHT | Gravity.BOTTOM;
case Surface.ROTATION_180:
return Gravity.CENTER_HORIZONTAL | Gravity.TOP;
return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
case Surface.ROTATION_270:
return Gravity.LEFT | Gravity.CENTER_VERTICAL;
return Gravity.LEFT | Gravity.BOTTOM;
}
} else {
// On devices with a natural orientation of landscape
switch (rotation) {
default:
case Surface.ROTATION_0:
return Gravity.RIGHT | Gravity.CENTER_VERTICAL;
return Gravity.RIGHT | Gravity.BOTTOM;
case Surface.ROTATION_90:
return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
case Surface.ROTATION_180:
return Gravity.LEFT | Gravity.CENTER_VERTICAL;
return Gravity.LEFT | Gravity.BOTTOM;
case Surface.ROTATION_270:
return Gravity.CENTER_HORIZONTAL | Gravity.TOP;
return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
}
}
}