Make Recent Apps faster

- start loading on touch down
- avoid unneeded calls to onLayout
- don't fade in thumbnails if they've been loaded before we show recent apps
- don't pause between loading thumbnails
- fade in thumbnails+shadow (rather than just thumbnail as before)

Change-Id: I6dd4be7f52f9e8b51284ae052614719db8e71dc5
This commit is contained in:
Michael Jurka
2011-10-17 09:05:00 -07:00
parent 87bc53de2a
commit 412cba8aa1
8 changed files with 119 additions and 73 deletions

View File

@@ -16,5 +16,5 @@
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@android:integer/config_mediumAnimTime"
android:duration="@android:integer/config_shortAnimTime"
/>

View File

@@ -39,11 +39,11 @@
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">
android:foreground="@drawable/recents_thumbnail_fg"
android:visibility="invisible">
<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>
@@ -58,7 +58,6 @@
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"
@@ -74,7 +73,6 @@
android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
android:singleLine="true"
android:ellipsize="marquee"
android:visibility="invisible"
android:textColor="@color/status_bar_recents_app_label_color"
/>

View File

@@ -52,11 +52,11 @@
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">
android:foreground="@drawable/recents_thumbnail_fg"
android:visibility="invisible">
<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"

View File

@@ -31,11 +31,11 @@
android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
android:scaleType="center"
android:background="@drawable/recents_thumbnail_bg"
android:foreground="@drawable/recents_thumbnail_fg">
android:foreground="@drawable/recents_thumbnail_fg"
android:visibility="invisible">
<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"