Skip to content

Commit 7cd4642

Browse files
cwrenAndroid (Google) Code Review
authored andcommitted
Merge "apply Jellybean styling to tablet system bar and panel" into jb-dev
2 parents 0876ab0 + 1e8f65d commit 7cd4642

File tree

10 files changed

+166
-279
lines changed

10 files changed

+166
-279
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

packages/SystemUI/res/layout/system_bar_notification_area.xml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,16 @@
7878
android:layout_height="match_parent"
7979
android:gravity="center"
8080
>
81-
<com.android.systemui.statusbar.tablet.HoloClock
81+
<com.android.systemui.statusbar.policy.Clock
8282
android:id="@+id/clock"
83+
android:textAppearance="@style/TextAppearance.StatusBar.Clock"
8384
android:layout_width="wrap_content"
84-
android:layout_height="wrap_content"
85-
android:layout_marginBottom="3dip"
86-
android:layout_marginLeft="8dip"
87-
android:layout_marginRight="4dip"
88-
>
89-
<TextView android:id="@+id/time_solid"
90-
android:layout_width="wrap_content"
91-
android:layout_height="wrap_content"
92-
android:textAppearance="@style/TextAppearance.StatusBar.Clock"
93-
android:singleLine="true"
94-
android:textSize="40sp"
95-
/>
96-
</com.android.systemui.statusbar.tablet.HoloClock>
85+
android:layout_height="match_parent"
86+
android:singleLine="true"
87+
android:paddingLeft="6dip"
88+
android:layout_marginRight="8dip"
89+
android:gravity="center_vertical|left"
90+
/>
9791

9892
<TextView
9993
android:id="@+id/network_text"

packages/SystemUI/res/layout/system_bar_notification_panel.xml

Lines changed: 33 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,69 +18,57 @@
1818
<com.android.systemui.statusbar.tablet.NotificationPanel
1919
xmlns:android="http://schemas.android.com/apk/res/android"
2020
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
21-
android:id="@+id/panel_root"
21+
android:id="@+id/content_parent"
2222
android:layout_height="match_parent"
2323
android:layout_width="match_parent"
2424
android:gravity="right"
2525
>
2626

27-
<ImageView android:id="@+id/clear_all_button"
28-
android:layout_width="wrap_content"
29-
android:layout_height="@*android:dimen/system_bar_height"
27+
<!-- lift the panel up off the status bar while leaving a touchable are -->
28+
<Space
29+
android:id="@+id/system_bar_notification_panel_bottom_space"
30+
android:layout_height="56dp"
31+
android:layout_width="478dp"
3032
android:layout_alignParentRight="true"
3133
android:layout_alignParentBottom="true"
32-
android:layout_marginRight="20dp"
33-
android:paddingLeft="15dp"
34-
android:paddingRight="15dp"
35-
android:src="@drawable/ic_notify_clear"
36-
android:visibility="invisible"
37-
android:contentDescription="@string/accessibility_clear_all"
3834
/>
3935

40-
<RelativeLayout
41-
android:id="@+id/content_parent"
36+
<LinearLayout
37+
android:id="@+id/content_frame"
38+
android:background="@drawable/notification_panel_bg"
4239
android:layout_height="wrap_content"
43-
android:layout_width="match_parent"
44-
android:layout_alignParentBottom="true"
40+
android:layout_width="478dp"
41+
android:orientation="vertical"
4542
android:layout_alignParentRight="true"
46-
android:layout_marginBottom="8dp"
43+
android:layout_above="@id/system_bar_notification_panel_bottom_space"
44+
android:paddingBottom="8dp"
4745
>
4846

4947
<include layout="@layout/system_bar_notification_panel_title"
50-
android:layout_width="478dp"
51-
android:layout_height="224dp"
52-
android:layout_alignParentTop="true"
48+
android:layout_width="match_parent"
49+
android:layout_height="130dp"
50+
android:layout_above="@id/content_frame"
5351
android:layout_alignParentRight="true"
52+
android:layout_weight="0"
5453
/>
5554

56-
<LinearLayout
57-
android:id="@+id/content_frame"
58-
android:background="@drawable/notify_panel_notify_bg"
55+
<ScrollView
56+
57+
android:id="@+id/notification_scroller"
5958
android:layout_height="wrap_content"
60-
android:layout_width="478dp"
61-
android:orientation="vertical"
62-
android:layout_alignParentRight="true"
63-
android:layout_alignParentTop="true"
64-
android:layout_marginTop="178dp"
59+
android:layout_width="match_parent"
60+
android:layout_weight="1"
6561
>
66-
<ScrollView
67-
android:id="@+id/notification_scroller"
68-
android:layout_height="wrap_content"
62+
<com.android.systemui.statusbar.policy.NotificationRowLayout
63+
android:id="@+id/content"
6964
android:layout_width="match_parent"
70-
android:layout_weight="1"
71-
>
72-
<com.android.systemui.statusbar.policy.NotificationRowLayout
73-
android:id="@+id/content"
74-
android:layout_width="match_parent"
75-
android:layout_height="wrap_content"
76-
android:gravity="center_horizontal|bottom"
77-
android:clickable="true"
78-
android:focusable="true"
79-
android:descendantFocusability="afterDescendants"
80-
systemui:rowHeight="@dimen/notification_row_min_height"
81-
/>
82-
</ScrollView>
83-
</LinearLayout>
84-
</RelativeLayout>
85-
65+
android:layout_height="wrap_content"
66+
android:gravity="center_horizontal|bottom"
67+
android:clickable="true"
68+
android:focusable="true"
69+
android:descendantFocusability="afterDescendants"
70+
systemui:rowHeight="@dimen/notification_row_min_height"
71+
/>
72+
</ScrollView>
73+
</LinearLayout>
8674
</com.android.systemui.statusbar.tablet.NotificationPanel>

packages/SystemUI/res/layout/system_bar_notification_panel_title.xml

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
xmlns:android="http://schemas.android.com/apk/res/android"
1919
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
2020
android:id="@+id/title_area"
21+
android:background="@color/notification_panel_solid_background"
2122
android:layout_width="wrap_content"
2223
android:layout_height="wrap_content"
2324
android:clickable="true"
2425
android:orientation="vertical"
25-
android:background="@drawable/notify_panel_clock_bg"
26+
android:paddingLeft="26dp"
27+
android:paddingTop="14dp"
28+
android:paddingRight="26dp"
2629
>
2730

2831
<TableLayout
@@ -31,7 +34,6 @@
3134
android:layout_height="wrap_content"
3235
android:layout_alignParentLeft="true"
3336
android:layout_alignParentBottom="true"
34-
android:layout_marginLeft="16dp"
3537
android:layout_marginTop="16dp"
3638
android:layout_marginBottom="16dp"
3739
android:shrinkColumns="2,4"
@@ -167,7 +169,6 @@
167169
android:id="@+id/settings_button"
168170
android:layout_width="wrap_content"
169171
android:layout_height="wrap_content"
170-
android:paddingRight="16dp"
171172
android:src="@drawable/ic_sysbar_quicksettings"
172173
android:contentDescription="@string/accessibility_settings_button"
173174
/>
@@ -176,7 +177,6 @@
176177
android:id="@+id/notification_button"
177178
android:layout_width="wrap_content"
178179
android:layout_height="wrap_content"
179-
android:paddingRight="16dp"
180180
android:src="@drawable/ic_notification_open"
181181
android:visibility="invisible"
182182
android:contentDescription="@string/accessibility_notifications_button"
@@ -186,40 +186,46 @@
186186
</TableRow>
187187
</TableLayout>
188188

189-
<com.android.systemui.statusbar.tablet.HoloClock
190-
android:id="@+id/clock"
189+
<LinearLayout
190+
xmlns:android="http://schemas.android.com/apk/res/android"
191+
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
192+
android:layout_width="match_parent"
191193
android:layout_height="wrap_content"
192-
android:layout_width="wrap_content"
193-
android:layout_alignParentRight="true"
194-
android:layout_marginRight="16dip"
195-
android:layout_marginTop="16dip"
194+
android:paddingTop="@dimen/notification_panel_header_padding_top"
195+
android:orientation="horizontal"
196+
android:gravity="center_vertical"
197+
android:baselineAligned="false"
196198
>
197-
<TextView android:id="@+id/time_bg"
198-
android:layout_width="match_parent"
199+
200+
<com.android.systemui.statusbar.policy.Clock
201+
android:id="@+id/clock"
202+
android:layout_width="wrap_content"
199203
android:layout_height="wrap_content"
200-
android:gravity="right"
201204
android:singleLine="true"
202-
android:textSize="92sp"
203-
android:textColor="#ffffff" />
204-
<TextView android:id="@+id/time_fg"
205-
android:layout_width="match_parent"
205+
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
206+
/>
207+
208+
<com.android.systemui.statusbar.policy.DateView
209+
android:id="@+id/date"
210+
android:layout_width="wrap_content"
206211
android:layout_height="wrap_content"
207-
android:gravity="right"
208-
android:singleLine="true"
209-
android:textSize="92sp"
210-
android:textColor="#ffffff" />
211-
</com.android.systemui.statusbar.tablet.HoloClock>
212-
213-
<com.android.systemui.statusbar.policy.DateView
214-
android:id="@+id/date"
215-
style="@style/StatusBarNotificationText"
216-
android:layout_height="wrap_content"
217-
android:layout_width="wrap_content"
218-
android:layout_alignBottom="@id/clock"
219-
android:layout_alignParentLeft="true"
220-
android:gravity="left"
221-
android:layout_marginLeft="16dp"
222-
android:textColor="#ffffff"
223-
/>
224-
212+
android:layout_marginLeft="8dp"
213+
android:layout_marginRight="8dp"
214+
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
215+
/>
216+
217+
<Space
218+
android:layout_width="0dp"
219+
android:layout_height="48dp"
220+
android:layout_weight="1"
221+
/>
222+
223+
<ImageView android:id="@+id/clear_all_button"
224+
android:layout_width="wrap_content"
225+
android:layout_height="wrap_content"
226+
android:scaleType="center"
227+
android:src="@drawable/ic_notify_clear"
228+
android:contentDescription="@string/accessibility_clear_all"
229+
/>
230+
</LinearLayout>
225231
</com.android.systemui.statusbar.tablet.NotificationPanelTitle>

packages/SystemUI/res/values-sw720dp/styles.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,24 @@
5151
<item name="android:background">@android:drawable/divider_horizontal_dark</item>
5252
</style>
5353

54+
<style name="TextAppearance.StatusBar.Clock" parent="@*android:style/TextAppearance.StatusBar.Icon">
55+
<item name="android:textSize">30dp</item>
56+
<item name="android:textStyle">normal</item>
57+
<item name="android:textColor">@android:color/holo_blue_light</item>
58+
</style>
59+
60+
<style name="TextAppearance.StatusBar.Expanded.Clock">
61+
<item name="android:textSize">48dp</item>
62+
<item name="android:fontFamily">sans-serif-light</item>
63+
<item name="android:textStyle">normal</item>
64+
<item name="android:textColor">#ffffff</item>
65+
</style>
66+
67+
<style name="TextAppearance.StatusBar.Expanded.Date">
68+
<item name="android:textSize">14dp</item>
69+
<item name="android:textStyle">normal</item>
70+
<item name="android:textColor">#666666</item>
71+
<item name="android:textAllCaps">true</item>
72+
</style>
73+
5474
</resources>

0 commit comments

Comments
 (0)