Skip to content

Commit 2d136a8

Browse files
author
Peter Ng
committed
Layout changes to recents
Bug: 5411813 -gravity is set to center -textsize is smaller -app icon placement now hangs off the screenshot -recents callout line now defined in colors -recents thumbnail normal state drawable added Change-Id: Ibeaec7e3f0a3bcdbe3f990886b1536cb7d7fdc03
1 parent dcb4e15 commit 2d136a8

File tree

13 files changed

+64
-51
lines changed

13 files changed

+64
-51
lines changed
-137 Bytes
Binary file not shown.
462 Bytes
Loading
-137 Bytes
Binary file not shown.
354 Bytes
Loading
-137 Bytes
Binary file not shown.
636 Bytes
Loading

packages/SystemUI/res/layout-land/status_bar_recent_item.xml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@
2626
android:paddingRight="@dimen/status_bar_recents_item_padding">
2727

2828
<RelativeLayout android:id="@+id/recent_item"
29-
android:layout_gravity="bottom"
29+
android:layout_gravity="center_vertical"
3030
android:layout_height="wrap_content"
3131
android:layout_width="wrap_content"
32-
android:paddingBottom="@*android:dimen/status_bar_height">
32+
android:paddingTop="@*android:dimen/status_bar_height">
3333

3434
<FrameLayout android:id="@+id/app_thumbnail"
3535
android:layout_width="wrap_content"
3636
android:layout_height="wrap_content"
3737
android:layout_alignParentLeft="true"
3838
android:layout_alignParentTop="true"
39+
android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin"
3940
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
4041
android:background="@drawable/recents_thumbnail_bg"
4142
android:foreground="@drawable/recents_thumbnail_fg">
@@ -44,19 +45,22 @@
4445
android:layout_height="@dimen/status_bar_recents_thumbnail_height"
4546
android:visibility="invisible"
4647
/>
47-
48-
<ImageView android:id="@+id/app_icon"
49-
android:layout_width="wrap_content"
50-
android:layout_height="wrap_content"
51-
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
52-
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
53-
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
54-
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
55-
android:adjustViewBounds="true"
56-
android:visibility="invisible"
57-
/>
5848
</FrameLayout>
5949

50+
<ImageView android:id="@+id/app_icon"
51+
android:layout_width="wrap_content"
52+
android:layout_height="wrap_content"
53+
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
54+
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
55+
android:layout_alignParentLeft="true"
56+
android:layout_alignParentTop="true"
57+
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
58+
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
59+
android:scaleType="centerInside"
60+
android:adjustViewBounds="true"
61+
android:visibility="invisible"
62+
/>
63+
6064
<TextView android:id="@+id/app_label"
6165
android:layout_width="@dimen/status_bar_recents_app_label_width"
6266
android:layout_height="wrap_content"
@@ -67,6 +71,7 @@
6771
android:layout_alignLeft="@id/app_thumbnail"
6872
android:layout_below="@id/app_thumbnail"
6973
android:layout_marginTop="@dimen/status_bar_recents_text_description_padding"
74+
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
7075
android:singleLine="true"
7176
android:ellipsize="marquee"
7277
android:visibility="invisible"

packages/SystemUI/res/layout-port/status_bar_recent_item.xml

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,10 @@
2626
android:paddingBottom="@dimen/status_bar_recents_item_padding">
2727

2828
<RelativeLayout android:id="@+id/recent_item"
29+
android:layout_gravity="center_horizontal"
2930
android:layout_height="wrap_content"
30-
android:layout_width="match_parent">
31+
android:layout_width="wrap_content">
3132

32-
<FrameLayout android:id="@+id/app_thumbnail"
33-
android:layout_width="wrap_content"
34-
android:layout_height="wrap_content"
35-
android:layout_alignParentLeft="true"
36-
android:layout_alignParentTop="true"
37-
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
38-
android:background="@drawable/recents_thumbnail_bg"
39-
android:foreground="@drawable/recents_thumbnail_fg">
40-
<ImageView android:id="@+id/app_thumbnail_image"
41-
android:layout_width="@dimen/status_bar_recents_thumbnail_width"
42-
android:layout_height="@dimen/status_bar_recents_thumbnail_height"
43-
android:visibility="invisible"
44-
/>
45-
<ImageView android:id="@+id/app_icon"
46-
android:layout_width="wrap_content"
47-
android:layout_height="wrap_content"
48-
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
49-
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
50-
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
51-
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
52-
android:adjustViewBounds="true"
53-
/>
54-
</FrameLayout>
5533
<TextView android:id="@+id/app_label"
5634
android:layout_width="@dimen/status_bar_recents_app_label_width"
5735
android:layout_height="wrap_content"
@@ -61,12 +39,26 @@
6139
android:scrollHorizontally="true"
6240
android:layout_alignParentLeft="true"
6341
android:layout_alignTop="@id/app_icon"
42+
android:paddingTop="2dp"
6443
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
6544
android:singleLine="true"
6645
android:ellipsize="marquee"
6746
android:textColor="@color/status_bar_recents_app_label_color"
6847
/>
69-
48+
<FrameLayout android:id="@+id/app_thumbnail"
49+
android:layout_width="wrap_content"
50+
android:layout_height="wrap_content"
51+
android:layout_alignParentTop="true"
52+
android:layout_toRightOf="@id/app_label"
53+
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
54+
android:background="@drawable/recents_thumbnail_bg"
55+
android:foreground="@drawable/recents_thumbnail_fg">
56+
<ImageView android:id="@+id/app_thumbnail_image"
57+
android:layout_width="@dimen/status_bar_recents_thumbnail_width"
58+
android:layout_height="@dimen/status_bar_recents_thumbnail_height"
59+
android:visibility="invisible"
60+
/>
61+
</FrameLayout>
7062
<View android:id="@+id/recents_callout_line"
7163
android:layout_width="@dimen/status_bar_recents_app_label_width"
7264
android:layout_height="1dip"
@@ -79,6 +71,18 @@
7971
android:background="@drawable/recents_callout_line"
8072
/>
8173

74+
<ImageView android:id="@+id/app_icon"
75+
android:layout_width="wrap_content"
76+
android:layout_height="wrap_content"
77+
android:layout_toRightOf="@id/app_label"
78+
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
79+
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
80+
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
81+
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
82+
android:scaleType="centerInside"
83+
android:adjustViewBounds="true"
84+
/>
85+
8286
<TextView android:id="@+id/app_description"
8387
android:layout_width="@dimen/status_bar_recents_app_label_width"
8488
android:layout_height="wrap_content"

packages/SystemUI/res/layout/status_bar_no_recent_apps.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
<TextView
2828
android:layout_width="wrap_content"
2929
android:layout_height="wrap_content"
30-
android:textSize="24dp"
31-
android:textColor="#ffffffff"
30+
android:textSize="20dp"
31+
android:textColor="@android:color/holo_blue_light"
3232
android:text="@string/status_bar_no_recent_apps"
3333
android:gravity="center_horizontal"
3434
android:layout_gravity="center"

packages/SystemUI/res/values-land/dimens.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@
2323
<!-- How far the thumbnail for a recent app appears from left edge -->
2424
<dimen name="status_bar_recents_thumbnail_left_margin">0dp</dimen>
2525
<!-- How far the thumbnail for a recent app appears from top edge -->
26-
<dimen name="status_bar_recents_thumbnail_top_margin">12dp</dimen>
26+
<dimen name="status_bar_recents_thumbnail_top_margin">28dp</dimen>
2727
<!-- Padding for text descriptions -->
2828
<dimen name="status_bar_recents_text_description_padding">8dp</dimen>
2929
<!-- Width of application label text -->
3030
<dimen name="status_bar_recents_app_label_width">156dip</dimen>
3131
<!-- Left margin of application label text -->
32-
<dimen name="status_bar_recents_app_label_left_margin">16dip</dimen>
32+
<dimen name="status_bar_recents_app_label_left_margin">12dip</dimen>
3333
<!-- Margin between recents container and glow on the right -->
3434
<dimen name="status_bar_recents_right_glow_margin">0dip</dimen>
3535
<!-- Padding between recents items -->
3636
<dimen name="status_bar_recents_item_padding">2dip</dimen>
37+
<!-- Where to place the app icon over the thumbnail -->
38+
<dimen name="status_bar_recents_app_icon_left_margin">8dp</dimen>
39+
<dimen name="status_bar_recents_app_icon_top_margin">8dp</dimen>
3740
</resources>

0 commit comments

Comments
 (0)