Fix wrong getIconBounds method inside BubbleTextView

Bug: 205065809
Test: screenshot on the bug

TL;DR;; created two variants depending on the layout direction

Change-Id: I9c5e74409c701b1f219ca450de0dca2291507045
This commit is contained in:
Hyunyoung Song
2021-11-03 23:16:53 -07:00
parent 3b5dddbce1
commit c2f024beb6
3 changed files with 39 additions and 12 deletions
@@ -628,7 +628,10 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
public void drawDot(Canvas canvas) {
if (!mForceHideDot && ((mDotInfo != null && mDotInfo.hasDot()) || mDotScale > 0)) {
Rect iconBounds = mDotParams.iconBounds;
BubbleTextView.getIconBounds(this, iconBounds, mActivity.getDeviceProfile().iconSizePx);
Utilities.setRectToViewCenter(this, mActivity.getDeviceProfile().iconSizePx,
iconBounds);
iconBounds.offsetTo(iconBounds.left, getPaddingTop());
float iconScale = (float) mBackground.previewSize / iconBounds.width();
Utilities.scaleRectAboutCenter(iconBounds, iconScale);