summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-05-12 13:24:58 -0700
committerMichael Jurka <mikejurka@google.com>2012-05-12 13:24:58 -0700
commitd5895a7e8a94e58451af640fe796d1822cbd793f (patch)
tree549e026345ecd9aaa578371f85215a128fc56983 /packages
parent0891a89790777e2f88f413351fafe49dda36714f (diff)
downloadframeworks_base-d5895a7e8a94e58451af640fe796d1822cbd793f.zip
frameworks_base-d5895a7e8a94e58451af640fe796d1822cbd793f.tar.gz
frameworks_base-d5895a7e8a94e58451af640fe796d1822cbd793f.tar.bz2
Improve transition out of recents
- During the transition, fade the bg to black - Exiting activity fades to black - Recents background no longer fades away, because then it would fight against the fade to black happening behind it
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/layout-land/status_bar_recent_panel.xml12
-rw-r--r--packages/SystemUI/res/layout-port/status_bar_recent_panel.xml12
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/Choreographer.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java2
4 files changed, 21 insertions, 19 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 869b164..8a21117 100644
--- a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
+++ b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
@@ -27,12 +27,6 @@
systemui:recentItemLayout="@layout/status_bar_recent_item"
>
- <ImageView
- android:id="@+id/recents_transition_placeholder_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="invisible" />
-
<FrameLayout
android:id="@+id/recents_bg_protect"
android:background="@drawable/status_bar_recents_background"
@@ -42,6 +36,12 @@
android:clipToPadding="false"
android:clipChildren="false">
+ <ImageView
+ android:id="@+id/recents_transition_placeholder_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="invisible" />
+
<com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container"
android:layout_width="wrap_content"
android:layout_height="match_parent"
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 fc9fcf4..1d29c5a 100644
--- a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml
+++ b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml
@@ -27,12 +27,6 @@
systemui:recentItemLayout="@layout/status_bar_recent_item"
>
- <ImageView
- android:id="@+id/recents_transition_placeholder_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="invisible" />
-
<FrameLayout
android:id="@+id/recents_bg_protect"
android:background="@drawable/status_bar_recents_background"
@@ -40,6 +34,12 @@
android:layout_height="match_parent"
android:layout_alignParentBottom="true">
+ <ImageView
+ android:id="@+id/recents_transition_placeholder_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="invisible" />
+
<com.android.systemui.recent.RecentsVerticalScrollView
android:id="@+id/recents_container"
android:layout_width="match_parent"
diff --git a/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java b/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
index a8c2020..ccdf038 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/Choreographer.java
@@ -102,12 +102,14 @@ import android.view.ViewRootImpl;
builder.with(noRecentAppsFadeAnim);
}
- Drawable background = mScrimView.getBackground();
- if (background != null) {
- Animator bgAnim = ObjectAnimator.ofInt(background,
- "alpha", appearing ? 0 : 255, appearing ? 255 : 0);
- bgAnim.setDuration(appearing ? SCRIM_DURATION : CLOSE_DURATION);
- builder.with(bgAnim);
+ if (appearing) {
+ Drawable background = mScrimView.getBackground();
+ if (background != null) {
+ Animator bgAnim = ObjectAnimator.ofInt(background,
+ "alpha", appearing ? 0 : 255, appearing ? 255 : 0);
+ bgAnim.setDuration(appearing ? SCRIM_DURATION : CLOSE_DURATION);
+ builder.with(bgAnim);
+ }
}
mContentAnim.addListener(this);
if (mListener != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index feb1ac8..6785c29 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -469,7 +469,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
Display d = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay();
if (!ActivityManager.isHighEndGfx(d)) {
- mRecentsScrim.setBackgroundDrawable(null);
+ mRecentsScrim.setBackground(null);
} else if (mRecentsScrim.getBackground() instanceof BitmapDrawable) {
// In order to save space, we make the background texture repeat in the Y direction
((BitmapDrawable) mRecentsScrim.getBackground()).setTileModeY(TileMode.REPEAT);