diff options
| author | Michael Jurka <mikejurka@google.com> | 2011-11-13 13:50:38 -0800 |
|---|---|---|
| committer | Michael Jurka <mikejurka@google.com> | 2011-11-14 23:49:10 -0800 |
| commit | bfd24acd318ef958bb7997c9cbf95c5fb15b10ac (patch) | |
| tree | 41e93afbac6ee62c19f7447d122298b46f92cb9a /packages/SystemUI/res | |
| parent | 2af9f21c664d4579b5f51283a320a7d1fba13a75 (diff) | |
| download | frameworks_base-bfd24acd318ef958bb7997c9cbf95c5fb15b10ac.zip frameworks_base-bfd24acd318ef958bb7997c9cbf95c5fb15b10ac.tar.gz frameworks_base-bfd24acd318ef958bb7997c9cbf95c5fb15b10ac.tar.bz2 | |
Updating recent apps visuals on tablet
- getting rid of blue glow (5529032)
- moving app icon position
- show message if there are no recent apps (5533332)
- fixing rare IllegalStateException on orientation change (5584344)
Change-Id: I2210e584957869c8f02339e6841daf39364a9dad
Diffstat (limited to 'packages/SystemUI/res')
8 files changed, 127 insertions, 103 deletions
diff --git a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml index 3ee9e77..180f022 100644 --- a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml +++ b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml @@ -33,39 +33,29 @@ android:clipToPadding="false" android:clipChildren="false"> - <LinearLayout android:id="@+id/recents_glow" + <com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_gravity="bottom|right" + android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" + android:divider="@null" + android:stackFromBottom="true" + android:fadingEdge="horizontal" + android:scrollbars="none" + android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length" + android:layout_gravity="bottom|left" android:orientation="horizontal" android:clipToPadding="false" - android:clipChildren="false" - > - <com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container" + android:clipChildren="false"> + + <LinearLayout android:id="@+id/recents_linear_layout" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" - android:divider="@null" - android:stackFromBottom="true" - android:fadingEdge="horizontal" - android:scrollbars="none" - android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length" - android:layout_gravity="bottom|left" android:orientation="horizontal" android:clipToPadding="false" android:clipChildren="false"> + </LinearLayout> - <LinearLayout android:id="@+id/recents_linear_layout" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:orientation="horizontal" - android:clipToPadding="false" - android:clipChildren="false"> - </LinearLayout> - - </com.android.systemui.recent.RecentsHorizontalScrollView> - - </LinearLayout> + </com.android.systemui.recent.RecentsHorizontalScrollView> </FrameLayout> diff --git a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml index d040544..e6a077a 100644 --- a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml +++ b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml @@ -31,39 +31,29 @@ android:layout_height="match_parent" android:layout_alignParentBottom="true"> - <LinearLayout android:id="@+id/recents_glow" + <com.android.systemui.recent.RecentsVerticalScrollView + android:id="@+id/recents_container" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="bottom" - android:orientation="horizontal" - android:clipChildren="false" - android:layout_marginTop="@*android:dimen/status_bar_height"> + android:layout_marginRight="0dp" + android:divider="@null" + android:stackFromBottom="true" + android:fadingEdge="vertical" + android:scrollbars="none" + android:fadingEdgeLength="@*android:dimen/status_bar_height" + android:layout_gravity="bottom|left" + android:clipToPadding="false" + android:clipChildren="false"> - <com.android.systemui.recent.RecentsVerticalScrollView - android:id="@+id/recents_container" + <LinearLayout android:id="@+id/recents_linear_layout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginRight="0dp" - android:divider="@null" - android:stackFromBottom="true" - android:fadingEdge="vertical" - android:scrollbars="none" - android:fadingEdgeLength="@*android:dimen/status_bar_height" - android:layout_gravity="bottom|left" + android:orientation="vertical" android:clipToPadding="false" android:clipChildren="false"> + </LinearLayout> - <LinearLayout android:id="@+id/recents_linear_layout" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:clipToPadding="false" - android:clipChildren="false"> - </LinearLayout> - - </com.android.systemui.recent.RecentsVerticalScrollView> - - </LinearLayout> + </com.android.systemui.recent.RecentsVerticalScrollView> </FrameLayout> diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_no_recent_apps.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_no_recent_apps.xml new file mode 100644 index 0000000..bc89281 --- /dev/null +++ b/packages/SystemUI/res/layout-sw600dp/status_bar_no_recent_apps.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* apps/common/assets/default/default/skins/StatusBar.xml +** +** Copyright 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. +*/ +--> + +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="match_parent" + android:layout_width="match_parent" + > + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="20dp" + android:textColor="@android:color/holo_blue_light" + android:text="@string/status_bar_no_recent_apps" + android:gravity="left" + android:layout_gravity="bottom|left" + /> +</FrameLayout> diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_recent_item.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_recent_item.xml index 18a31f7..cb26db00 100644 --- a/packages/SystemUI/res/layout-sw600dp/status_bar_recent_item.xml +++ b/packages/SystemUI/res/layout-sw600dp/status_bar_recent_item.xml @@ -23,11 +23,26 @@ android:layout_height="wrap_content" android:layout_width="wrap_content"> - <FrameLayout android:id="@+id/app_thumbnail" - android:layout_width="wrap_content" + <TextView android:id="@+id/app_label" + android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" + android:textSize="@dimen/status_bar_recents_app_label_text_size" + android:fadingEdge="horizontal" + android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length" + android:scrollHorizontally="true" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" + android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" + android:layout_marginTop="32dip" + 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_toRightOf="@id/app_label" android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin" android:scaleType="center" android:background="@drawable/recents_thumbnail_bg" @@ -37,33 +52,22 @@ android:layout_width="@dimen/status_bar_recents_thumbnail_width" android:layout_height="@dimen/status_bar_recents_thumbnail_height" /> - <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" + + <ImageView android:id="@+id/app_icon" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="@dimen/status_bar_recents_app_label_text_size" - android:fadingEdge="horizontal" - android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length" - android:scrollHorizontally="true" - android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" - android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" - android:layout_marginTop="32dip" - android:singleLine="true" - android:ellipsize="marquee" - android:textColor="@color/status_bar_recents_app_label_color" + 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" /> + <View android:id="@+id/recents_callout_line" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="1dip" diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_recent_panel.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_recent_panel.xml index 5dd101e..111f9a4 100644 --- a/packages/SystemUI/res/layout-sw600dp/status_bar_recent_panel.xml +++ b/packages/SystemUI/res/layout-sw600dp/status_bar_recent_panel.xml @@ -36,40 +36,36 @@ android:clipToPadding="false" android:clipChildren="false"> - <LinearLayout android:id="@+id/recents_glow" + <com.android.systemui.recent.RecentsVerticalScrollView android:id="@+id/recents_container" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="-49dip" - android:layout_gravity="bottom" - android:background="@drawable/recents_blue_glow" - android:orientation="horizontal" + android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" + android:divider="@null" + android:stackFromBottom="true" + android:fadingEdge="vertical" + android:scrollbars="none" + android:fadingEdgeLength="20dip" + android:layout_gravity="bottom|left" android:clipToPadding="false" - android:clipChildren="false" - > - <com.android.systemui.recent.RecentsVerticalScrollView android:id="@+id/recents_container" + android:clipChildren="false"> + + <LinearLayout android:id="@+id/recents_linear_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" - android:divider="@null" - android:stackFromBottom="true" - android:fadingEdge="vertical" - android:scrollbars="none" - android:fadingEdgeLength="20dip" - android:layout_gravity="bottom|left" + android:orientation="vertical" android:clipToPadding="false" android:clipChildren="false"> + </LinearLayout> - <LinearLayout android:id="@+id/recents_linear_layout" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:clipToPadding="false" - android:clipChildren="false"> - </LinearLayout> - - </com.android.systemui.recent.RecentsVerticalScrollView> + </com.android.systemui.recent.RecentsVerticalScrollView> - </LinearLayout> + <include layout="@layout/status_bar_no_recent_apps" + android:id="@+id/recents_no_apps" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginLeft="58dip" + android:layout_marginBottom="36dip" + android:visibility="invisible" /> </FrameLayout> @@ -82,4 +78,5 @@ android:contentDescription="@string/status_bar_accessibility_dismiss_recents" /> + </com.android.systemui.recent.RecentsPanelView> diff --git a/packages/SystemUI/res/values-sw600dp/config.xml b/packages/SystemUI/res/values-sw600dp/config.xml index 3e2ec59..24185a4 100644 --- a/packages/SystemUI/res/values-sw600dp/config.xml +++ b/packages/SystemUI/res/values-sw600dp/config.xml @@ -18,8 +18,11 @@ --> <resources> - <!-- Whether we're using the tablet-optimized recents interface (we use this value at runtime for some things) --> <bool name="config_recents_interface_for_tablets">true</bool> + + <!-- Whether recents thumbnails should stretch in both x and y to fill their + ImageView --> + <bool name="config_recents_thumbnail_image_fits_to_xy">true</bool> </resources> diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml index fe9245d..f522285 100644 --- a/packages/SystemUI/res/values-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp/dimens.xml @@ -31,15 +31,15 @@ <!-- Recent Applications parameters --> <!-- How far the thumbnail for a recent app appears from left edge --> - <dimen name="status_bar_recents_thumbnail_left_margin">121dp</dimen> + <dimen name="status_bar_recents_thumbnail_left_margin">28dp</dimen> <!-- Upper width limit for application icon --> <dimen name="status_bar_recents_app_icon_max_width">64dp</dimen> <!-- Upper height limit for application icon --> <dimen name="status_bar_recents_app_icon_max_height">64dp</dimen> <!-- Size of application icon --> - <dimen name="status_bar_recents_thumbnail_width">245dp</dimen> - <dimen name="status_bar_recents_thumbnail_height">144dp</dimen> + <dimen name="status_bar_recents_thumbnail_width">208dp</dimen> + <dimen name="status_bar_recents_thumbnail_height">130dp</dimen> <!-- Width of recents panel --> <dimen name="status_bar_recents_width">600dp</dimen> @@ -59,8 +59,8 @@ <dimen name="status_bar_recents_right_glow_margin">100dip</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_left_margin">0dp</dimen> + <dimen name="status_bar_recents_app_icon_top_margin">8dp</dimen> <!-- size at which Notification icons will be drawn in the status bar --> <dimen name="status_bar_icon_drawing_size">24dip</dimen> diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 1fe4ebb..1f22507 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -25,6 +25,10 @@ value at runtime for some things) --> <bool name="config_recents_interface_for_tablets">false</bool> + <!-- Whether recents thumbnails should stretch in both x and y to fill their + ImageView --> + <bool name="config_recents_thumbnail_image_fits_to_xy">false</bool> + <!-- Control whether status bar should distinguish HSPA data icon form UMTS data icon on devices --> <bool name="config_hspa_data_distinguishable">false</bool> |
