Loading quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +11 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,17 @@ public class BubbleBarView extends FrameLayout { } } @Override public void setAlpha(float alpha) { super.setAlpha(alpha); int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View childView = getChildAt(i); if (!(childView instanceof BubbleView)) continue; ((BubbleView) childView).setProvideShadowOutline(alpha == 1f); } } /** * Sets new icon sizes and newBubbleBarPadding between icons and bubble bar borders. * Loading quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java +14 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,8 @@ public class BubbleView extends ConstraintLayout { // The current scale value of the dot private float mDotScale; private boolean mProvideShadowOutline = true; // TODO: (b/273310265) handle RTL // Whether the bubbles are positioned on the left or right side of the screen private boolean mOnLeft = false; Loading Loading @@ -113,17 +115,28 @@ public class BubbleView extends ConstraintLayout { }); } //TODO(b/345490679) remove once proper shadow is applied /** Set whether provide an outline. */ public void setProvideShadowOutline(boolean provideOutline) { if (mProvideShadowOutline == provideOutline) return; mProvideShadowOutline = provideOutline; invalidateOutline(); } private void getOutline(Outline outline) { updateBubbleSizeAndDotRender(); final int normalizedSize = IconNormalizer.getNormalizedCircleSize(mBubbleSize); final int inset = (mBubbleSize - normalizedSize) / 2; if (mProvideShadowOutline) { outline.setOval(inset, inset, inset + normalizedSize, inset + normalizedSize); } } private void updateBubbleSizeAndDotRender() { int updatedBubbleSize = Math.min(getWidth(), getHeight()); if (updatedBubbleSize == mBubbleSize) return; mBubbleSize = updatedBubbleSize; invalidateOutline(); if (mBubble == null || mBubble instanceof BubbleBarOverflow) return; Path dotPath = ((BubbleBarBubble) mBubble).getDotPath(); mDotRenderer = new DotRenderer(mBubbleSize, dotPath, DEFAULT_PATH_SIZE); Loading Loading
quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +11 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,17 @@ public class BubbleBarView extends FrameLayout { } } @Override public void setAlpha(float alpha) { super.setAlpha(alpha); int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View childView = getChildAt(i); if (!(childView instanceof BubbleView)) continue; ((BubbleView) childView).setProvideShadowOutline(alpha == 1f); } } /** * Sets new icon sizes and newBubbleBarPadding between icons and bubble bar borders. * Loading
quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java +14 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,8 @@ public class BubbleView extends ConstraintLayout { // The current scale value of the dot private float mDotScale; private boolean mProvideShadowOutline = true; // TODO: (b/273310265) handle RTL // Whether the bubbles are positioned on the left or right side of the screen private boolean mOnLeft = false; Loading Loading @@ -113,17 +115,28 @@ public class BubbleView extends ConstraintLayout { }); } //TODO(b/345490679) remove once proper shadow is applied /** Set whether provide an outline. */ public void setProvideShadowOutline(boolean provideOutline) { if (mProvideShadowOutline == provideOutline) return; mProvideShadowOutline = provideOutline; invalidateOutline(); } private void getOutline(Outline outline) { updateBubbleSizeAndDotRender(); final int normalizedSize = IconNormalizer.getNormalizedCircleSize(mBubbleSize); final int inset = (mBubbleSize - normalizedSize) / 2; if (mProvideShadowOutline) { outline.setOval(inset, inset, inset + normalizedSize, inset + normalizedSize); } } private void updateBubbleSizeAndDotRender() { int updatedBubbleSize = Math.min(getWidth(), getHeight()); if (updatedBubbleSize == mBubbleSize) return; mBubbleSize = updatedBubbleSize; invalidateOutline(); if (mBubble == null || mBubble instanceof BubbleBarOverflow) return; Path dotPath = ((BubbleBarBubble) mBubble).getDotPath(); mDotRenderer = new DotRenderer(mBubbleSize, dotPath, DEFAULT_PATH_SIZE); Loading