From 5664de2524be15329882bf81925d08b5de760b8c Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Thu, 12 Sep 2013 02:53:22 +0200 Subject: Update assets for pressed/focused/selected states Also, add shadow below/above wallpaper strip Bug: 10722070 Change-Id: I37c445bab90e103f414c95b62e101a73d060661f --- src/com/android/launcher3/WallpaperPickerActivity.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/src/com/android/launcher3/WallpaperPickerActivity.java index d980967e6..824dea642 100644 --- a/src/com/android/launcher3/WallpaperPickerActivity.java +++ b/src/com/android/launcher3/WallpaperPickerActivity.java @@ -109,8 +109,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { mIgnoreNextTap = true; } mAnim = new LauncherViewPropertyAnimator(wallpaperStrip); - mAnim.translationY(wallpaperStrip.getHeight()) - .setInterpolator(new DecelerateInterpolator(0.75f)); + mAnim.translationY(wallpaperStrip.getHeight()).alpha(0f) + .setInterpolator(new DecelerateInterpolator(0.75f)); mAnim.start(); } public void onTap() { @@ -121,7 +121,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { mAnim.cancel(); } mAnim = new LauncherViewPropertyAnimator(wallpaperStrip); - mAnim.translationY(0).setInterpolator(new DecelerateInterpolator(0.75f)); + mAnim.translationY(0).alpha(1f) + .setInterpolator(new DecelerateInterpolator(0.75f)); mAnim.start(); } } @@ -363,7 +364,16 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { cursor.close(); return thumb; } - + + protected void onStop() { + super.onStop(); + final View wallpaperStrip = findViewById(R.id.wallpaper_strip); + if (wallpaperStrip.getTranslationY() > 0) { + wallpaperStrip.setTranslationY(0); + wallpaperStrip.setAlpha(1f); + } + } + protected void onSaveInstanceState(Bundle outState) { outState.putParcelableArrayList(TEMP_WALLPAPER_TILES, mTempWallpaperTiles); } -- cgit v1.2.3