summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget/WidgetsBottomSheet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/widget/WidgetsBottomSheet.java')
-rw-r--r--src/com/android/launcher3/widget/WidgetsBottomSheet.java4
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 2f9f3485c..0b4bf628e 100644
--- a/src/com/android/launcher3/widget/WidgetsBottomSheet.java
+++ b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
@@ -275,7 +275,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