diff options
author | Mario Bertschler <bmario@google.com> | 2017-07-24 14:41:23 -0700 |
---|---|---|
committer | Mario Bertschler <bmario@google.com> | 2017-07-26 14:33:22 -0700 |
commit | 254bd42729e404d13a779b73b2f5dd67fa21e7da (patch) | |
tree | 728b77a741c98c1b0170d656c9ebe9c8a62b894d /src/com/android/launcher3/widget | |
parent | 8806475b8ee18b93ea832d1212daea6cdde8d0a5 (diff) | |
download | android_packages_apps_Trebuchet-254bd42729e404d13a779b73b2f5dd67fa21e7da.tar.gz android_packages_apps_Trebuchet-254bd42729e404d13a779b73b2f5dd67fa21e7da.tar.bz2 android_packages_apps_Trebuchet-254bd42729e404d13a779b73b2f5dd67fa21e7da.zip |
Merging ScrimView into GradientView
Less banding, less drawing for All Apps Transition.
Bug: 63873246
Change-Id: I6c7c856e2939a10db7e44b266c1d6d51334fd152
Diffstat (limited to 'src/com/android/launcher3/widget')
-rw-r--r-- | src/com/android/launcher3/widget/WidgetsBottomSheet.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/widget/WidgetsBottomSheet.java b/src/com/android/launcher3/widget/WidgetsBottomSheet.java index a754375ae..b2fb09157 100644 --- a/src/com/android/launcher3/widget/WidgetsBottomSheet.java +++ b/src/com/android/launcher3/widget/WidgetsBottomSheet.java @@ -276,7 +276,9 @@ public class WidgetsBottomSheet extends AbstractFloatingView implements Insettab public void setTranslationY(float translationY) { super.setTranslationY(translationY); if (mGradientBackground == null) return; - mGradientBackground.setProgress((mTranslationYClosed - translationY) / mTranslationYRange); + float p = (mTranslationYClosed - translationY) / mTranslationYRange; + boolean showScrim = p <= 0; + mGradientBackground.setProgress(p, showScrim); } @Override |