Loading quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +0 −5 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ import com.android.launcher3.R; import com.android.launcher3.anim.SpringAnimationBuilder; import com.android.launcher3.taskbar.bubbles.animation.BubbleAnimator; import com.android.launcher3.util.DisplayController; import com.android.wm.shell.Flags; import com.android.wm.shell.common.bubbles.BubbleBarLocation; import java.io.PrintWriter; Loading Loading @@ -260,10 +259,6 @@ public class BubbleBarView extends FrameLayout { if (!isIconSizeOrPaddingUpdated(newIconSize, newBubbleBarPadding)) { return; } if (!Flags.animateBubbleSizeChange()) { setIconSizeAndPadding(newIconSize, newBubbleBarPadding); return; } if (mScalePaddingAnimator != null && mScalePaddingAnimator.isRunning()) { mScalePaddingAnimator.cancel(); } Loading quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java +18 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Outline; import android.graphics.Path; import android.graphics.Rect; import android.text.TextUtils; import android.util.AttributeSet; Loading Loading @@ -47,7 +48,7 @@ public class BubbleView extends ConstraintLayout { private final ImageView mBubbleIcon; private final ImageView mAppIcon; private final int mBubbleSize; private int mBubbleSize; private float mDragTranslationX; private float mOffsetX; Loading Loading @@ -89,8 +90,6 @@ public class BubbleView extends ConstraintLayout { setLayoutDirection(LAYOUT_DIRECTION_LTR); LayoutInflater.from(context).inflate(R.layout.bubble_view, this); mBubbleSize = getResources().getDimensionPixelSize(R.dimen.bubblebar_icon_size); mBubbleIcon = findViewById(R.id.icon_view); mAppIcon = findViewById(R.id.app_icon_view); Loading @@ -107,11 +106,21 @@ public class BubbleView extends ConstraintLayout { } private void getOutline(Outline outline) { updateBubbleSizeAndDotRender(); final int normalizedSize = IconNormalizer.getNormalizedCircleSize(mBubbleSize); final int inset = (mBubbleSize - normalizedSize) / 2; outline.setOval(inset, inset, inset + normalizedSize, inset + normalizedSize); } private void updateBubbleSizeAndDotRender() { int updatedBubbleSize = Math.min(getWidth(), getHeight()); if (updatedBubbleSize == mBubbleSize) return; mBubbleSize = updatedBubbleSize; if (mBubble == null || mBubble instanceof BubbleBarOverflow) return; Path dotPath = ((BubbleBarBubble) mBubble).getDotPath(); mDotRenderer = new DotRenderer(mBubbleSize, dotPath, DEFAULT_PATH_SIZE); } /** * Set translation-x while this bubble is being dragged. * Translation applied to the view is a sum of {@code translationX} and offset defined by Loading Loading @@ -141,6 +150,12 @@ public class BubbleView extends ConstraintLayout { applyDragTranslation(); } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); updateBubbleSizeAndDotRender(); } private void applyDragTranslation() { setTranslationX(mDragTranslationX + mOffsetX); } Loading Loading
quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +0 −5 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ import com.android.launcher3.R; import com.android.launcher3.anim.SpringAnimationBuilder; import com.android.launcher3.taskbar.bubbles.animation.BubbleAnimator; import com.android.launcher3.util.DisplayController; import com.android.wm.shell.Flags; import com.android.wm.shell.common.bubbles.BubbleBarLocation; import java.io.PrintWriter; Loading Loading @@ -260,10 +259,6 @@ public class BubbleBarView extends FrameLayout { if (!isIconSizeOrPaddingUpdated(newIconSize, newBubbleBarPadding)) { return; } if (!Flags.animateBubbleSizeChange()) { setIconSizeAndPadding(newIconSize, newBubbleBarPadding); return; } if (mScalePaddingAnimator != null && mScalePaddingAnimator.isRunning()) { mScalePaddingAnimator.cancel(); } Loading
quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java +18 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Outline; import android.graphics.Path; import android.graphics.Rect; import android.text.TextUtils; import android.util.AttributeSet; Loading Loading @@ -47,7 +48,7 @@ public class BubbleView extends ConstraintLayout { private final ImageView mBubbleIcon; private final ImageView mAppIcon; private final int mBubbleSize; private int mBubbleSize; private float mDragTranslationX; private float mOffsetX; Loading Loading @@ -89,8 +90,6 @@ public class BubbleView extends ConstraintLayout { setLayoutDirection(LAYOUT_DIRECTION_LTR); LayoutInflater.from(context).inflate(R.layout.bubble_view, this); mBubbleSize = getResources().getDimensionPixelSize(R.dimen.bubblebar_icon_size); mBubbleIcon = findViewById(R.id.icon_view); mAppIcon = findViewById(R.id.app_icon_view); Loading @@ -107,11 +106,21 @@ public class BubbleView extends ConstraintLayout { } private void getOutline(Outline outline) { updateBubbleSizeAndDotRender(); final int normalizedSize = IconNormalizer.getNormalizedCircleSize(mBubbleSize); final int inset = (mBubbleSize - normalizedSize) / 2; outline.setOval(inset, inset, inset + normalizedSize, inset + normalizedSize); } private void updateBubbleSizeAndDotRender() { int updatedBubbleSize = Math.min(getWidth(), getHeight()); if (updatedBubbleSize == mBubbleSize) return; mBubbleSize = updatedBubbleSize; if (mBubble == null || mBubble instanceof BubbleBarOverflow) return; Path dotPath = ((BubbleBarBubble) mBubble).getDotPath(); mDotRenderer = new DotRenderer(mBubbleSize, dotPath, DEFAULT_PATH_SIZE); } /** * Set translation-x while this bubble is being dragged. * Translation applied to the view is a sum of {@code translationX} and offset defined by Loading Loading @@ -141,6 +150,12 @@ public class BubbleView extends ConstraintLayout { applyDragTranslation(); } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); updateBubbleSizeAndDotRender(); } private void applyDragTranslation() { setTranslationX(mDragTranslationX + mOffsetX); } Loading