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
This commit is contained in:
Peter Ng
2011-10-12 15:49:39 -07:00
parent dcb4e158bc
commit 2d136a83a0
13 changed files with 64 additions and 51 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

View File

@@ -26,16 +26,17 @@
android:paddingRight="@dimen/status_bar_recents_item_padding">
<RelativeLayout android:id="@+id/recent_item"
android:layout_gravity="bottom"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingBottom="@*android:dimen/status_bar_height">
android:paddingTop="@*android:dimen/status_bar_height">
<FrameLayout android:id="@+id/app_thumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin"
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
android:background="@drawable/recents_thumbnail_bg"
android:foreground="@drawable/recents_thumbnail_fg">
@@ -44,19 +45,22 @@
android:layout_height="@dimen/status_bar_recents_thumbnail_height"
android:visibility="invisible"
/>
<ImageView android:id="@+id/app_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
android:adjustViewBounds="true"
android:visibility="invisible"
/>
</FrameLayout>
<ImageView android:id="@+id/app_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
android:scaleType="centerInside"
android:adjustViewBounds="true"
android:visibility="invisible"
/>
<TextView android:id="@+id/app_label"
android:layout_width="@dimen/status_bar_recents_app_label_width"
android:layout_height="wrap_content"
@@ -67,6 +71,7 @@
android:layout_alignLeft="@id/app_thumbnail"
android:layout_below="@id/app_thumbnail"
android:layout_marginTop="@dimen/status_bar_recents_text_description_padding"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
android:singleLine="true"
android:ellipsize="marquee"
android:visibility="invisible"

View File

@@ -26,32 +26,10 @@
android:paddingBottom="@dimen/status_bar_recents_item_padding">
<RelativeLayout android:id="@+id/recent_item"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent">
android:layout_width="wrap_content">
<FrameLayout android:id="@+id/app_thumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
android:background="@drawable/recents_thumbnail_bg"
android:foreground="@drawable/recents_thumbnail_fg">
<ImageView android:id="@+id/app_thumbnail_image"
android:layout_width="@dimen/status_bar_recents_thumbnail_width"
android:layout_height="@dimen/status_bar_recents_thumbnail_height"
android:visibility="invisible"
/>
<ImageView android:id="@+id/app_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
android:adjustViewBounds="true"
/>
</FrameLayout>
<TextView android:id="@+id/app_label"
android:layout_width="@dimen/status_bar_recents_app_label_width"
android:layout_height="wrap_content"
@@ -61,12 +39,26 @@
android:scrollHorizontally="true"
android:layout_alignParentLeft="true"
android:layout_alignTop="@id/app_icon"
android:paddingTop="2dp"
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
android:singleLine="true"
android:ellipsize="marquee"
android:textColor="@color/status_bar_recents_app_label_color"
/>
<FrameLayout android:id="@+id/app_thumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/app_label"
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
android:background="@drawable/recents_thumbnail_bg"
android:foreground="@drawable/recents_thumbnail_fg">
<ImageView android:id="@+id/app_thumbnail_image"
android:layout_width="@dimen/status_bar_recents_thumbnail_width"
android:layout_height="@dimen/status_bar_recents_thumbnail_height"
android:visibility="invisible"
/>
</FrameLayout>
<View android:id="@+id/recents_callout_line"
android:layout_width="@dimen/status_bar_recents_app_label_width"
android:layout_height="1dip"
@@ -79,6 +71,18 @@
android:background="@drawable/recents_callout_line"
/>
<ImageView android:id="@+id/app_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/app_label"
android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
android:scaleType="centerInside"
android:adjustViewBounds="true"
/>
<TextView android:id="@+id/app_description"
android:layout_width="@dimen/status_bar_recents_app_label_width"
android:layout_height="wrap_content"

View File

@@ -27,8 +27,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24dp"
android:textColor="#ffffffff"
android:textSize="20dp"
android:textColor="@android:color/holo_blue_light"
android:text="@string/status_bar_no_recent_apps"
android:gravity="center_horizontal"
android:layout_gravity="center"

View File

@@ -23,15 +23,18 @@
<!-- How far the thumbnail for a recent app appears from left edge -->
<dimen name="status_bar_recents_thumbnail_left_margin">0dp</dimen>
<!-- How far the thumbnail for a recent app appears from top edge -->
<dimen name="status_bar_recents_thumbnail_top_margin">12dp</dimen>
<dimen name="status_bar_recents_thumbnail_top_margin">28dp</dimen>
<!-- Padding for text descriptions -->
<dimen name="status_bar_recents_text_description_padding">8dp</dimen>
<!-- Width of application label text -->
<dimen name="status_bar_recents_app_label_width">156dip</dimen>
<!-- Left margin of application label text -->
<dimen name="status_bar_recents_app_label_left_margin">16dip</dimen>
<dimen name="status_bar_recents_app_label_left_margin">12dip</dimen>
<!-- Margin between recents container and glow on the right -->
<dimen name="status_bar_recents_right_glow_margin">0dip</dimen>
<!-- Padding between recents items -->
<dimen name="status_bar_recents_item_padding">2dip</dimen>
<!-- Where to place the app icon over the thumbnail -->
<dimen name="status_bar_recents_app_icon_left_margin">8dp</dimen>
<dimen name="status_bar_recents_app_icon_top_margin">8dp</dimen>
</resources>

View File

@@ -18,15 +18,18 @@
<resources>
<!-- Recent Applications parameters -->
<!-- How far the thumbnail for a recent app appears from left edge -->
<dimen name="status_bar_recents_thumbnail_left_margin">110dp</dimen>
<dimen name="status_bar_recents_thumbnail_left_margin">20dp</dimen>
<!-- Padding for text descriptions -->
<dimen name="status_bar_recents_text_description_padding">8dp</dimen>
<!-- Width of application label text -->
<dimen name="status_bar_recents_app_label_width">88dip</dimen>
<!-- Left margin of application label text -->
<dimen name="status_bar_recents_app_label_left_margin">16dip</dimen>
<dimen name="status_bar_recents_app_label_left_margin">0dip</dimen>
<!-- Margin between recents container and glow on the right -->
<dimen name="status_bar_recents_right_glow_margin">100dip</dimen>
<!-- Padding between recents items -->
<dimen name="status_bar_recents_item_padding">0dip</dimen>
<!-- Where to place the app icon over the thumbnail -->
<dimen name="status_bar_recents_app_icon_left_margin">0dp</dimen>
<dimen name="status_bar_recents_app_icon_top_margin">8dp</dimen>
</resources>

View File

@@ -29,4 +29,5 @@
<drawable name="notification_header_bg">#d8000000</drawable>
<drawable name="notification_tracking_bg">#d8000000</drawable>
<color name="notification_list_shadow_top">#80000000</color>
<drawable name="recents_callout_line">#66ffffff</drawable>
</resources>

View File

@@ -21,21 +21,18 @@
<!-- Recent Applications parameters -->
<!-- Upper width limit for application icon -->
<dimen name="status_bar_recents_app_icon_max_width">64dp</dimen>
<dimen name="status_bar_recents_app_icon_max_width">48dp</dimen>
<!-- Upper height limit for application icon -->
<dimen name="status_bar_recents_app_icon_max_height">64dp</dimen>
<!-- Where to place the app icon over the thumbnail -->
<dimen name="status_bar_recents_app_icon_left_margin">13dp</dimen>
<dimen name="status_bar_recents_app_icon_top_margin">13dp</dimen>
<dimen name="status_bar_recents_app_icon_max_height">48dp</dimen>
<!-- Size of application thumbnail -->
<dimen name="status_bar_recents_thumbnail_width">164dp</dimen>
<dimen name="status_bar_recents_thumbnail_height">145dp</dimen>
<!-- Size of application label text -->
<dimen name="status_bar_recents_app_label_text_size">16dip</dimen>
<dimen name="status_bar_recents_app_label_text_size">14dip</dimen>
<!-- Size of application description text -->
<dimen name="status_bar_recents_app_description_text_size">16dip</dimen>
<dimen name="status_bar_recents_app_description_text_size">14dip</dimen>
<!-- Size of fading edge for scroll effect -->
<dimen name="status_bar_recents_fading_edge_length">20dip</dimen>
<!-- Margin between recents container and glow on the right -->