From 7e6809ad643fa4a70cfb647191731c68f07789cd Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Wed, 6 Aug 2014 16:03:14 -0400 Subject: [PATCH] Common shade width across devices. Use 400dp as the visual width of the shade across all devices and orientations, except small device portrait. Since the width is now dynamic across orientations, update the necessary views in SystemUI on rotate. Remove obsolete styles + resources. Set max QS columns to 3 on all devices, due to the newer shade width. Bug:16825515 Change-Id: Iff171549a79bc318a4d585a2d9ea2af9bc686922 --- packages/SystemUI/res/layout/heads_up.xml | 6 ++- .../SystemUI/res/layout/status_bar_expanded.xml | 4 +- .../res/layout/status_bar_expanded_header.xml | 3 +- packages/SystemUI/res/layout/volume_dialog.xml | 4 +- packages/SystemUI/res/values-land/config.xml | 3 -- packages/SystemUI/res/values-land/dimens.xml | 5 ++- packages/SystemUI/res/values-sw600dp/config.xml | 3 -- packages/SystemUI/res/values-sw600dp/dimens.xml | 12 ++---- packages/SystemUI/res/values-sw600dp/styles.xml | 11 ----- packages/SystemUI/res/values-sw720dp/dimens.xml | 4 -- packages/SystemUI/res/values/dimens.xml | 12 +++--- packages/SystemUI/res/values/styles.xml | 11 +---- .../android/systemui/statusbar/BaseStatusBar.java | 2 +- .../statusbar/phone/NotificationPanelView.java | 33 ++++++++++++-- .../systemui/statusbar/phone/PhoneStatusBar.java | 13 +++++- .../statusbar/phone/StatusBarHeaderView.java | 28 ++++++------ .../statusbar/policy/HeadsUpNotificationView.java | 9 ++++ .../com/android/systemui/volume/VolumePanel.java | 50 ++++++++++++++-------- .../src/com/android/systemui/volume/VolumeUI.java | 9 ++++ 19 files changed, 132 insertions(+), 90 deletions(-) diff --git a/packages/SystemUI/res/layout/heads_up.xml b/packages/SystemUI/res/layout/heads_up.xml index 0e2b6d66ef81..650ee5dfc0cf 100644 --- a/packages/SystemUI/res/layout/heads_up.xml +++ b/packages/SystemUI/res/layout/heads_up.xml @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> + + android:id="@+id/content_holder" /> \ No newline at end of file diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml index fa1077b8624c..fc2dc023f02d 100644 --- a/packages/SystemUI/res/layout/status_bar_expanded.xml +++ b/packages/SystemUI/res/layout/status_bar_expanded.xml @@ -55,7 +55,9 @@ android:visibility="invisible" /> diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml index 1afde692b263..688a88c7ee12 100644 --- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml +++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml @@ -20,8 +20,9 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui" android:id="@+id/header" - style="@style/StatusBarHeader" + android:layout_width="@dimen/notification_panel_width" android:layout_height="@dimen/status_bar_header_height" + android:layout_gravity="@integer/notification_panel_layout_gravity" android:paddingStart="@dimen/notification_side_padding" android:paddingEnd="@dimen/notification_side_padding" android:baselineAligned="false" diff --git a/packages/SystemUI/res/layout/volume_dialog.xml b/packages/SystemUI/res/layout/volume_dialog.xml index 112f3a92efe5..3765fe87c187 100644 --- a/packages/SystemUI/res/layout/volume_dialog.xml +++ b/packages/SystemUI/res/layout/volume_dialog.xml @@ -15,8 +15,10 @@ limitations under the License. --> diff --git a/packages/SystemUI/res/values-land/config.xml b/packages/SystemUI/res/values-land/config.xml index 575502929286..2b1a4dc94076 100644 --- a/packages/SystemUI/res/values-land/config.xml +++ b/packages/SystemUI/res/values-land/config.xml @@ -24,9 +24,6 @@ value at runtime for some things) --> 90 - - 4 - 2 diff --git a/packages/SystemUI/res/values-land/dimens.xml b/packages/SystemUI/res/values-land/dimens.xml index 42c4392dce77..9b772bdbd0d1 100644 --- a/packages/SystemUI/res/values-land/dimens.xml +++ b/packages/SystemUI/res/values-land/dimens.xml @@ -41,6 +41,7 @@ 0.2229 - - 384dp + + @dimen/standard_notification_panel_width + @integer/standard_notification_panel_layout_gravity diff --git a/packages/SystemUI/res/values-sw600dp/config.xml b/packages/SystemUI/res/values-sw600dp/config.xml index 9f4c364f4a72..4f6d209b3f7a 100644 --- a/packages/SystemUI/res/values-sw600dp/config.xml +++ b/packages/SystemUI/res/values-sw600dp/config.xml @@ -20,9 +20,6 @@ - - 4 - 4 diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml index 1c60c1884340..48b85347355c 100644 --- a/packages/SystemUI/res/values-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp/dimens.xml @@ -16,12 +16,9 @@ */ --> - - 432dp - - - - 0x31 + + @dimen/standard_notification_panel_width + @integer/standard_notification_panel_layout_gravity 430dip @@ -49,9 +46,6 @@ 0.075 - - 384dp - diff --git a/packages/SystemUI/res/values-sw600dp/styles.xml b/packages/SystemUI/res/values-sw600dp/styles.xml index 88372bc67479..5daf08e6659c 100644 --- a/packages/SystemUI/res/values-sw600dp/styles.xml +++ b/packages/SystemUI/res/values-sw600dp/styles.xml @@ -19,17 +19,6 @@ 480dp - - - - - - - - -