Use dimen for GridSize_minDeviceWidth/Height

Makes the grid size format more flexible, as it allows the min width and
height to be easily defined either as px, or dp (which may be
preferable for upcoming desktop grids - I noticed that scaling display
size may end up with too tightly packed grid when using pixel sizes
to select the correct grid size).

Test: Existing tests
Bug: 375643744
Flag: EXEMPT cleanup

Change-Id: I09b772ece177fe0539a1ff641ff2391e88d9e289
This commit is contained in:
Toni Barzic
2025-05-08 03:34:15 +00:00
parent af24c515c9
commit ff16a5912d
3 changed files with 9 additions and 9 deletions
@@ -1209,8 +1209,8 @@ public class InvariantDeviceProfile {
mNumRows = (int) a.getFloat(R.styleable.GridSize_numGridRows, 0);
mNumColumns = (int) a.getFloat(R.styleable.GridSize_numGridColumns, 0);
mMinDeviceWidthPx = a.getFloat(R.styleable.GridSize_minDeviceWidthPx, 0);
mMinDeviceHeightPx = a.getFloat(R.styleable.GridSize_minDeviceHeightPx, 0);
mMinDeviceWidthPx = a.getDimensionPixelSize(R.styleable.GridSize_minDeviceWidth, 0);
mMinDeviceHeightPx = a.getDimensionPixelSize(R.styleable.GridSize_minDeviceHeight, 0);
mDbFile = a.getString(R.styleable.GridSize_dbFile);
mDefaultLayoutId = a.getResourceId(
R.styleable.GridSize_defaultLayoutId, 0);