Scale down folder cells to fit within bounds if necessary.

The number of folder cols/rows are set in InvariantDeviceProfile.
Because of this, we may need to scale down the folder cells in
multi-window mode.

Bug: 32176631
Change-Id: I925d5ac9d29439c5d61cf089e7784065a8cb5ebd
This commit is contained in:
Jon Miranda
2016-11-03 15:29:29 -07:00
parent 8f6ada9563
commit bf7d8121ea
3 changed files with 50 additions and 29 deletions

View File

@@ -128,7 +128,9 @@ public class BubbleTextView extends TextView
setCompoundDrawablePadding(grid.allAppsIconDrawablePaddingPx);
defaultIconSize = grid.allAppsIconSizePx;
} else if (display == DISPLAY_FOLDER) {
setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.folderChildTextSizePx);
setCompoundDrawablePadding(grid.folderChildDrawablePaddingPx);
defaultIconSize = grid.folderChildIconSizePx;
}
mCenterVertically = a.getBoolean(R.styleable.BubbleTextView_centerVertically, false);