Skip to content

Commit 4a066c5

Browse files
committed
Update SystemUI for sw600dp devices.
Devices between 600 and 719dp will now use the two-bar (phone) SystemUI layout, or something like it, derived from PhoneStatusBar. Devices above 720dp will use the system bar from TabletStatusBar. However, this distinction is not to be made based on dp, at least, not by the SystemUI; the goal is to drive most of this switch from the window manager. Therefore most of SystemUI's sw600dp resources have been folded into the main set of resources (renaming them to avoid collisions where appropriate). This allows SystemUI to choose which set of resources to use entirely by switching status bar components, entirely independent of Configuration. (For some resources, particularly around recents, it seemed more expeditious to keep relying on the device configuration, so those resources have been bumped up to sw720dp.) Bug: 6297838 Change-Id: I3f5414a6a718bdc83f51930d6878cdf97df48c9c
1 parent 8b0af62 commit 4a066c5

File tree

248 files changed

+516
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+516
-171
lines changed

core/res/res/layout-sw600dp/status_bar_latest_event_ticker.xml renamed to core/res/res/layout-sw720dp/status_bar_latest_event_ticker.xml

File renamed without changes.

core/res/res/layout-sw600dp/status_bar_latest_event_ticker_large_icon.xml renamed to core/res/res/layout-sw720dp/status_bar_latest_event_ticker_large_icon.xml

File renamed without changes.

core/res/res/values-large/dimens.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@
1717
*/
1818
-->
1919
<resources>
20-
<!-- Height of the status bar -->
21-
<dimen name="status_bar_height">48dip</dimen>
22-
<!-- Width and height of a single notification icon in the status bar -->
23-
<dimen name="status_bar_icon_size">32dip</dimen>
24-
<!-- Size of the giant number (unread count) in the notifications -->
25-
<dimen name="status_bar_content_number_size">48sp</dimen>
26-
2720
<!-- Default height of a key in the password keyboard for alpha -->
2821
<dimen name="password_keyboard_key_height_alpha">75dip</dimen>
2922
<!-- Default height of a key in the password keyboard for numeric -->

core/res/res/values-sw600dp/dimens.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
*/
1919
-->
2020
<resources>
21-
<!-- Height of the status bar -->
22-
<dimen name="status_bar_height">48dip</dimen>
23-
<!-- Width and height of a single notification icon in the status bar -->
24-
<dimen name="status_bar_icon_size">24dip</dimen>
25-
<!-- Size of the giant number (unread count) in the notifications -->
26-
<dimen name="status_bar_content_number_size">48sp</dimen>
27-
2821
<!-- The maximum number of action buttons that should be permitted within
2922
an action bar/action mode. This will be used to determine how many
3023
showAsAction="ifRoom" items can fit. "always" items can override this. -->
@@ -82,5 +75,8 @@
8275
(the screen is in landscape). This may be either a fraction or a dimension.-->
8376
<item type="dimen" name="dialog_fixed_height_minor">90%</item>
8477

78+
<!-- Height of the bottom navigation bar in portrait; on sw600dp devices
79+
this is a bit taller -->
80+
<dimen name="navigation_bar_height_portrait">56dp</dimen>
8581
</resources>
8682

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
/*
4-
** Copyright 2011, The Android Open Source Project
3+
**
4+
** Copyright 2012, The Android Open Source Project
55
**
66
** Licensed under the Apache License, Version 2.0 (the "License");
77
** you may not use this file except in compliance with the License.
@@ -16,13 +16,10 @@
1616
** limitations under the License.
1717
*/
1818
-->
19-
2019
<resources>
21-
<!-- Whether we're using the tablet-optimized recents interface (we use this
22-
value at runtime for some things) -->
23-
<bool name="config_recents_interface_for_tablets">true</bool>
24-
25-
<!-- Whether recents thumbnails should stretch in both x and y to fill their
26-
ImageView -->
27-
<bool name="config_recents_thumbnail_image_fits_to_xy">true</bool>
20+
<!-- Height of the bottom navigation bar in portrait; on sw720dp devices
21+
this is the same as the height in landscape -->
22+
<dimen name="navigation_bar_height_portrait">@dimen/navigation_bar_height</dimen>
2823
</resources>
24+
25+

core/res/res/values/dimens.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,22 @@
3434
<dimen name="status_bar_height">25dip</dimen>
3535
<!-- Height of the bottom navigation / system bar. -->
3636
<dimen name="navigation_bar_height">48dp</dimen>
37+
<!-- Height of the bottom navigation bar in portrait -->
38+
<dimen name="navigation_bar_height_portrait">@dimen/navigation_bar_height</dimen>
3739
<!-- Width of the navigation bar when it is placed vertically on the screen -->
3840
<dimen name="navigation_bar_width">42dp</dimen>
3941
<!-- Height of notification icons in the status bar -->
4042
<dimen name="status_bar_icon_size">24dip</dimen>
4143
<!-- Size of the giant number (unread count) in the notifications -->
4244
<dimen name="status_bar_content_number_size">48sp</dimen>
45+
<!-- Height of the system bar (combined status & navigation); used by
46+
SystemUI internally, not respected by the window manager. -->
47+
<dimen name="system_bar_height">@dimen/navigation_bar_height</dimen>
4348
<!-- Height of notification icons in the system bar -->
4449
<dimen name="system_bar_icon_size">32dip</dimen>
4550
<!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
4651
<dimen name="status_bar_edge_ignore">5dp</dimen>
52+
4753
<!-- Size of the fastscroll hint letter -->
4854
<dimen name="fastscroll_overlay_size">104dp</dimen>
4955
<!-- Width of the fastscroll thumb -->
@@ -221,5 +227,4 @@
221227
action bar tabs from becoming too wide on a wide screen when only
222228
a few are present. -->
223229
<dimen name="action_bar_stacked_tab_max_width">180dp</dimen>
224-
225230
</resources>

packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_ime_default.png renamed to packages/SystemUI/res/drawable-sw720dp-hdpi/ic_sysbar_ime_default.png

File renamed without changes.

packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_ime_pressed.png renamed to packages/SystemUI/res/drawable-sw720dp-hdpi/ic_sysbar_ime_pressed.png

File renamed without changes.

packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_zoom_default.png renamed to packages/SystemUI/res/drawable-sw720dp-hdpi/ic_sysbar_zoom_default.png

File renamed without changes.

packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_zoom_pressed.png renamed to packages/SystemUI/res/drawable-sw720dp-hdpi/ic_sysbar_zoom_pressed.png

File renamed without changes.

0 commit comments

Comments
 (0)