diff options
author | Daniel Sandler <dsandler@google.com> | 2011-01-14 16:39:19 -0500 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2011-01-19 16:41:48 -0500 |
commit | 2f447aa3b0e9cd6c35b57109baa3dea603f4fe11 (patch) | |
tree | 78915a22142bbff6c1faee19dd149ea6d031922d /packages | |
parent | c40fc87147baffa2a71d66550a0f99ca2524f4b9 (diff) | |
download | frameworks_base-2f447aa3b0e9cd6c35b57109baa3dea603f4fe11.zip frameworks_base-2f447aa3b0e9cd6c35b57109baa3dea603f4fe11.tar.gz frameworks_base-2f447aa3b0e9cd6c35b57109baa3dea603f4fe11.tar.bz2 |
Notification & settings panel redesign.
Bug: 3353758
Change-Id: Ibe98ed78c471344e1fb3cb462c83b76678c665f7
Diffstat (limited to 'packages')
20 files changed, 190 insertions, 143 deletions
diff --git a/packages/SystemUI/assets/fonts/AndroidClock.ttf b/packages/SystemUI/assets/fonts/AndroidClock.ttf Binary files differindex 3945183..7b550ee 100644 --- a/packages/SystemUI/assets/fonts/AndroidClock.ttf +++ b/packages/SystemUI/assets/fonts/AndroidClock.ttf diff --git a/packages/SystemUI/assets/fonts/AndroidClock2.ttf b/packages/SystemUI/assets/fonts/AndroidClock2.ttf Binary files differindex fa0221e..a95d548 100644 --- a/packages/SystemUI/assets/fonts/AndroidClock2.ttf +++ b/packages/SystemUI/assets/fonts/AndroidClock2.ttf diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_default.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_default.png Binary files differindex dadb0cd..92ffde9 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_default.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_default.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_pressed.png Binary files differindex 51d7cc2..0cd05a3 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_pressed.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_pressed.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png Binary files differindex 3359602..993ea55 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_default.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_default.png Binary files differindex 91bc4ee..d00a0c9 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_default.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_default.png diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_pressed.png Binary files differindex aa64de4..7d225346 100644 --- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_pressed.png +++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_pressed.png diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_bg.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_bg.9.png Binary files differnew file mode 100644 index 0000000..22d6c79 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/notify_panel_bg.9.png diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_bg_protect.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_bg_protect.png Binary files differnew file mode 100644 index 0000000..24166da --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/notify_panel_bg_protect.png diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg.9.png Binary files differnew file mode 100644 index 0000000..85d9795 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg.9.png diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png Binary files differnew file mode 100644 index 0000000..b389a35 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png diff --git a/packages/SystemUI/res/drawable-mdpi/panel_notification.png b/packages/SystemUI/res/drawable-mdpi/panel_notification.png Binary files differnew file mode 100644 index 0000000..3789f3c --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/panel_notification.png diff --git a/packages/SystemUI/res/drawable-nodpi/notify_panel_bg_protect.png b/packages/SystemUI/res/drawable-nodpi/notify_panel_bg_protect.png Binary files differdeleted file mode 100755 index e9589d9..0000000 --- a/packages/SystemUI/res/drawable-nodpi/notify_panel_bg_protect.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable/notify_panel_bg_protect_tiled.xml b/packages/SystemUI/res/drawable/notify_panel_bg_protect_tiled.xml new file mode 100644 index 0000000..0371322 --- /dev/null +++ b/packages/SystemUI/res/drawable/notify_panel_bg_protect_tiled.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<bitmap + xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/notify_panel_bg_protect" + android:tileMode="repeat" + /> + diff --git a/packages/SystemUI/res/drawable/status_bar_item_background.xml b/packages/SystemUI/res/drawable/status_bar_item_background.xml index 9da92a7..3a50aa9 100644 --- a/packages/SystemUI/res/drawable/status_bar_item_background.xml +++ b/packages/SystemUI/res/drawable/status_bar_item_background.xml @@ -20,7 +20,6 @@ > <item android:drawable="@drawable/notification_item_background_color" - android:left="16dp" /> </layer-list> diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml index 7f84b21..26e045c 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml @@ -25,8 +25,8 @@ <View android:id="@+id/scrim" - android:background="@drawable/notify_panel_bg_protect" - android:layout_width="match_parent" + android:background="@drawable/notify_panel_bg_protect_tiled" + android:layout_width="512dp" android:layout_height="match_parent" android:layout_alignParentTop="true" android:layout_alignParentRight="true" @@ -35,142 +35,27 @@ <RelativeLayout android:id="@+id/content_parent" android:layout_height="wrap_content" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" > - <RelativeLayout - android:id="@+id/title_area" - android:layout_height="160dp" - android:layout_width="384dp" - android:layout_marginLeft="24dp" - android:paddingTop="20dp" - android:orientation="vertical" + + <include layout="@layout/status_bar_notification_panel_title" + android:layout_width="471dp" + android:layout_height="465dp" android:layout_alignParentTop="true" android:layout_alignParentRight="true" - android:background="@drawable/panel_notification_tiled" - > - - <com.android.systemui.statusbar.tablet.HoloClock - android:id="@+id/clock" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:layout_alignParentTop="true" - android:layout_marginRight="40dip" - android:layout_marginBottom="4dip" - > - <TextView android:id="@+id/time_bg" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="right" - android:singleLine="true" - android:textSize="90dip" - android:textColor="#999999" /> - <TextView android:id="@+id/time_fg" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="right" - android:singleLine="true" - android:textSize="90dip" - android:textColor="#666666" /> - </com.android.systemui.statusbar.tablet.HoloClock> - - <com.android.systemui.statusbar.policy.DateView - android:id="@+id/date" - style="@style/StatusBarNotificationText" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:layout_below="@id/clock" - android:layout_marginTop="4dp" - android:layout_marginRight="48dp" - android:gravity="right" - /> - - <ImageView - android:id="@+id/battery" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_alignParentLeft="true" - android:layout_below="@id/date" - android:layout_marginLeft="48dp" - android:layout_marginTop="18dp" - android:layout_marginRight="8dp" - android:baseline="15dp" - /> - - <TextView - android:id="@+id/battery_text" - style="@style/StatusBarNotificationText" - android:layout_width="56dp" - android:layout_height="wrap_content" - android:layout_toRightOf="@id/battery" - android:layout_alignBaseline="@id/battery" - android:singleLine="true" - android:text="@string/status_bar_settings_settings_button" - /> - - <ImageView - android:id="@+id/network_signal" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_toRightOf="@id/battery_text" - android:layout_alignBaseline="@id/battery" - android:layout_marginRight="8dp" - android:baseline="15dp" - /> - - <ImageView - android:id="@+id/network_type" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_toRightOf="@id/battery_text" - android:layout_alignBaseline="@id/battery" - android:layout_marginRight="8dp" - android:baseline="15dp" - /> - - <TextView - android:id="@+id/network_text" - style="@style/StatusBarNotificationText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_toRightOf="@id/network_signal" - android:layout_alignBaseline="@id/battery" - android:singleLine="true" - android:text="@string/status_bar_settings_settings_button" - /> - - <ImageView - android:id="@+id/settings_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignBaseline="@id/battery" - android:layout_alignParentRight="true" - android:paddingRight="16dp" - android:src="@drawable/ic_notification_open" - android:baseline="21dp" - /> - - <ImageView - android:id="@+id/notification_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_alignBaseline="@id/battery" - android:paddingRight="16dp" - android:visibility="invisible" - android:src="@drawable/status_bar_veto" - android:baseline="21dp" - /> - </RelativeLayout> + /> <LinearLayout android:id="@+id/content_frame" + android:background="@drawable/notify_panel_notify_bg" android:layout_height="wrap_content" - android:layout_width="408dp" + android:layout_width="447dp" android:orientation="vertical" - android:layout_below="@id/title_area" android:layout_alignParentRight="true" + android:layout_alignParentTop="true" + android:layout_marginTop="352dp" > <ScrollView android:id="@+id/notification_scroller" @@ -189,17 +74,9 @@ android:clickable="true" android:focusable="true" android:descendantFocusability="afterDescendants" - systemui:insetLeft="16dp" > </com.android.systemui.statusbar.tablet.NotificationLinearLayout> </ScrollView> - <ImageView - android:id="@+id/notification_glow" - android:layout_width="match_parent" - android:layout_height="@dimen/status_bar_panel_bottom_offset" - android:layout_marginLeft="16dp" - android:src="@drawable/notify_item_glow_bottom" - /> </LinearLayout> </RelativeLayout> diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel_title.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel_title.xml new file mode 100644 index 0000000..992995c --- /dev/null +++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel_title.xml @@ -0,0 +1,153 @@ +<!-- + Copyright (C) 2006 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui" + android:id="@+id/title_area" + android:layout_width="0dp" + android:layout_height="0dp" + android:orientation="vertical" + android:background="@drawable/notify_panel_clock_bg" + > + + <ImageView + android:id="@+id/network_signal" + android:layout_height="32dp" + android:layout_width="32dp" + android:scaleType="centerInside" + android:layout_alignParentLeft="true" + android:layout_alignParentBottom="true" + android:baseline="22dp" + android:layout_marginLeft="32dp" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + /> + + <ImageView + android:id="@+id/network_type" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:layout_alignLeft="@id/network_signal" + android:layout_alignBottom="@id/network_signal" + android:layout_marginRight="8dp" + /> + + <TextView + android:id="@+id/network_text" + style="@style/StatusBarNotificationText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/network_signal" + android:layout_marginRight="8dp" + android:layout_alignBaseline="@id/network_signal" + android:singleLine="true" + android:text="@string/status_bar_settings_settings_button" + /> + + <ImageView + android:id="@+id/battery" + android:layout_height="32dp" + android:layout_width="32dp" + android:scaleType="centerInside" + android:layout_toRightOf="@id/network_text" + android:layout_alignBaseline="@id/network_signal" + android:baseline="22dp" + /> + + <TextView + android:id="@+id/battery_text" + style="@style/StatusBarNotificationText" + android:layout_width="56dp" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/battery" + android:layout_alignBaseline="@id/battery" + android:layout_marginRight="8dp" + android:singleLine="true" + android:text="@string/status_bar_settings_settings_button" + /> + + <ImageView + android:id="@+id/settings_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBaseline="@id/battery" + android:layout_alignParentRight="true" + android:paddingRight="16dp" + android:src="@drawable/ic_notification_open" + android:baseline="21dp" + /> + + <ImageView + android:id="@+id/notification_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_alignBaseline="@id/battery" + android:paddingRight="16dp" + android:visibility="invisible" + android:src="@drawable/status_bar_veto" + android:baseline="21dp" + /> + + <View + android:id="@+id/title_divider" + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginLeft="32dp" + android:layout_alignParentRight="true" + android:layout_alignParentBottom="true" + android:layout_marginBottom="64dip" + android:background="@android:drawable/divider_horizontal_dark" + /> + + <com.android.systemui.statusbar.tablet.HoloClock + android:id="@+id/clock" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:layout_alignParentRight="true" + android:layout_above="@id/title_divider" + android:layout_marginRight="32dip" + android:layout_marginBottom="8dip" + > + <TextView android:id="@+id/time_bg" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="right" + android:singleLine="true" + android:textSize="80sp" + android:textColor="#999999" /> + <TextView android:id="@+id/time_fg" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="right" + android:singleLine="true" + android:textSize="80sp" + android:textColor="#666666" /> + </com.android.systemui.statusbar.tablet.HoloClock> + + <com.android.systemui.statusbar.policy.DateView + android:id="@+id/date" + style="@style/StatusBarNotificationText" + android:layout_height="wrap_content" + android:layout_width="142dp" + android:layout_alignBottom="@id/clock" + android:layout_alignParentLeft="true" + android:gravity="left" + android:layout_marginLeft="32dp" + /> + +</RelativeLayout> diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml index e97345b..233cb46 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml @@ -32,7 +32,6 @@ android:layout_alignParentTop="true" android:layout_toRightOf="@id/large_icon" android:layout_toLeftOf="@id/veto" - android:layout_marginLeft="16dp" android:focusable="true" android:clickable="true" /> @@ -40,7 +39,6 @@ <View android:layout_width="match_parent" android:layout_height="1dp" - android:layout_marginLeft="16dp" android:layout_alignParentBottom="true" android:background="@android:drawable/divider_horizontal_dark" /> diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_settings_view.xml b/packages/SystemUI/res/layout-xlarge/status_bar_settings_view.xml index 8a477e4..1dbd759 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar_settings_view.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar_settings_view.xml @@ -22,8 +22,7 @@ android:layout_height="wrap_content" android:orientation="vertical" android:background="@drawable/status_bar_item_background" - android:paddingLeft="16dp" - android:paddingRight="46dp" + android:paddingRight="48dp" > <!-- Airplane mode --> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java index 45a22b6..2b29403 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java @@ -50,7 +50,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, View mSettingsButton; View mNotificationButton; View mNotificationScroller; - View mNotificationGlow; ViewGroup mContentFrame; Rect mContentArea; View mSettingsView; @@ -85,7 +84,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, mNotificationButton = (ImageView)findViewById(R.id.notification_button); mNotificationScroller = findViewById(R.id.notification_scroller); - mNotificationGlow = findViewById(R.id.notification_glow); mContentFrame = (ViewGroup)findViewById(R.id.content_frame); } @@ -130,6 +128,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); + mChoreo.setPanelHeight(mContentParent.getHeight()); } @@ -185,7 +184,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, void addSettingsView() { LayoutInflater infl = LayoutInflater.from(getContext()); mSettingsView = infl.inflate(R.layout.status_bar_settings_view, mContentFrame, false); - mContentFrame.addView(mSettingsView, mContentFrame.indexOfChild(mNotificationGlow)); + mContentFrame.addView(mSettingsView); } private class Choreographer implements Animator.AnimatorListener { |