commit | 3e94d52732cdc1a10c117cf1bed9a8d6242db5c7 | [log] [tgz] |
---|---|---|
author | Liran Binyamin <liranb@google.com> | Fri May 19 12:36:54 2023 -0400 |
committer | Liran Binyamin <liranb@google.com> | Thu Jun 15 18:07:54 2023 +0000 |
tree | 31ff670619f401a2f4dd4c4a3f8b2e0cb89a1720 | |
parent | 35b1f38403ba455c9980970fc2d91c269e8e72ea [diff] |
Fade the bubble bar arrow in and out when the bubble bar expands and collapses. Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/hKhpM98JZe1gT8bwtYkNeW Bug: 280604480 Test: Tested on a physical device Change-Id: Iaee9aeb0a8c1e2bd61816964e4cae5f7bea926ff
diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarBackground.kt b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarBackground.kt index cd95ad3..1e3f4f1 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarBackground.kt +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarBackground.kt
@@ -61,8 +61,11 @@ pointerSize = res.getDimension(R.dimen.bubblebar_pointer_size) shadowAlpha = - if (Utilities.isDarkTheme(context)) DARK_THEME_SHADOW_ALPHA - else LIGHT_THEME_SHADOW_ALPHA + if (Utilities.isDarkTheme(context)) { + DARK_THEME_SHADOW_ALPHA + } else { + LIGHT_THEME_SHADOW_ALPHA + } arrowDrawable = ShapeDrawable(TriangleShape.create(pointerSize, pointerSize, /* pointUp= */ true)) @@ -134,4 +137,8 @@ override fun setColorFilter(colorFilter: ColorFilter?) { paint.colorFilter = colorFilter } + + fun setArrowAlpha(alpha: Int) { + arrowDrawable.paint.alpha = alpha + } }
diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java index 8b3e2e4..ac5bfc6 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java
@@ -262,6 +262,7 @@ mBubbleBarBackground.setArrowPosition(arrowPosition); } + mBubbleBarBackground.setArrowAlpha((int) (255 * widthState)); mBubbleBarBackground.setWidth(interpolatedWidth); }