Merge "Fix bug 5133509 - Align holo menu panel windows along the bottom of the screen"
This commit is contained in:
BIN
core/res/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png
Normal file
BIN
core/res/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 713 B |
BIN
core/res/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png
Normal file
BIN
core/res/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 641 B |
BIN
core/res/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png
Normal file
BIN
core/res/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 486 B |
BIN
core/res/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png
Normal file
BIN
core/res/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 474 B |
BIN
core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png
Normal file
BIN
core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 997 B |
BIN
core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png
Normal file
BIN
core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 882 B |
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user