Fix folder icon text alignment.

- We set the parent view padding to be cellYPadding, so we no longer need to
  account for it when setting the text LayoutParams.

Bug: 191954558
Test: grid where scalableGrid=true and scalableGrid=false (4x5, and 5x5)
Change-Id: I8d7578b2589f801ceef229b663446d868d135ad0
This commit is contained in:
Jon Miranda 2021-06-25 10:33:20 -07:00
parent 8db306f3c5
commit 2be425b6b0
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
icon.mFolderName.setText(folderInfo.title); icon.mFolderName.setText(folderInfo.title);
icon.mFolderName.setCompoundDrawablePadding(0); icon.mFolderName.setCompoundDrawablePadding(0);
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) icon.mFolderName.getLayoutParams(); FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) icon.mFolderName.getLayoutParams();
lp.topMargin = grid.cellYPaddingPx + grid.iconSizePx + grid.iconDrawablePaddingPx; lp.topMargin = grid.iconSizePx + grid.iconDrawablePaddingPx;
icon.setTag(folderInfo); icon.setTag(folderInfo);
icon.setOnClickListener(ItemClickHandler.INSTANCE); icon.setOnClickListener(ItemClickHandler.INSTANCE);