summaryrefslogtreecommitdiffstats
path: root/WallpaperPicker
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2015-08-03 23:59:10 (GMT)
committerAdam Cohen <adamcohen@google.com>2015-08-04 02:06:50 (GMT)
commit209a859dedba0e8314ee102a760aad78a814ea94 (patch)
tree4375e1efbd19b386fb2d519e3e9c52a1ea573eab /WallpaperPicker
parent153b02a5e69c99b1154eea107da6b2fba4c6f3a3 (diff)
downloadandroid_packages_apps_Trebuchet-209a859dedba0e8314ee102a760aad78a814ea94.zip
android_packages_apps_Trebuchet-209a859dedba0e8314ee102a760aad78a814ea94.tar.gz
android_packages_apps_Trebuchet-209a859dedba0e8314ee102a760aad78a814ea94.tar.bz2
Fix issue where scroll container shadow didn't fade out
Change-Id: I3b0104dea04009819db0375c381b8ff445b76baa
Diffstat (limited to 'WallpaperPicker')
-rw-r--r--WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
index 88dc3e2..c723b39 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -100,6 +100,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
@Thunk LinearLayout mWallpapersView;
@Thunk HorizontalScrollView mWallpaperScrollContainer;
+ @Thunk View mWallpaperStrip;
@Thunk ActionMode.Callback mActionModeCallback;
@Thunk ActionMode mActionMode;
@@ -379,6 +380,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
mProgressView = findViewById(R.id.loading);
mWallpaperScrollContainer = (HorizontalScrollView) findViewById(R.id.wallpaper_scroll_container);
+ mWallpaperStrip = findViewById(R.id.wallpaper_strip);
mCropView.setTouchCallback(new CropView.TouchCallback() {
ViewPropertyAnimator mAnim;
@Override
@@ -386,15 +388,15 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
if (mAnim != null) {
mAnim.cancel();
}
- if (mWallpaperScrollContainer.getAlpha() == 1f) {
+ if (mWallpaperStrip.getAlpha() == 1f) {
mIgnoreNextTap = true;
}
- mAnim = mWallpaperScrollContainer.animate();
+ mAnim = mWallpaperStrip.animate();
mAnim.alpha(0f)
.setDuration(150)
.withEndAction(new Runnable() {
public void run() {
- mWallpaperScrollContainer.setVisibility(View.INVISIBLE);
+ mWallpaperStrip.setVisibility(View.INVISIBLE);
}
});
mAnim.setInterpolator(new AccelerateInterpolator(0.75f));
@@ -412,8 +414,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
if (mAnim != null) {
mAnim.cancel();
}
- mWallpaperScrollContainer.setVisibility(View.VISIBLE);
- mAnim = mWallpaperScrollContainer.animate();
+ mWallpaperStrip.setVisibility(View.VISIBLE);
+ mAnim = mWallpaperStrip.animate();
mAnim.alpha(1f)
.setDuration(150)
.setInterpolator(new DecelerateInterpolator(0.75f));
@@ -713,10 +715,10 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
public void onStop() {
super.onStop();
- mWallpaperScrollContainer = (HorizontalScrollView) findViewById(R.id.wallpaper_scroll_container);
- if (mWallpaperScrollContainer.getAlpha() < 1f) {
- mWallpaperScrollContainer.setAlpha(1f);
- mWallpaperScrollContainer.setVisibility(View.VISIBLE);
+ mWallpaperStrip = findViewById(R.id.wallpaper_strip);
+ if (mWallpaperStrip.getAlpha() < 1f) {
+ mWallpaperStrip.setAlpha(1f);
+ mWallpaperStrip.setVisibility(View.VISIBLE);
}
}