Summary:
Two pronged approach to keeping team numbers on a single line:
First, support auto sizing the text to fit the available space. We will support shrinking down to a minimum of 14sp, and a max of 20sp (the default size).
Second, increase the space available for the team number in the first place to 80dp from 72dp. This should prevent the text from resizing for the majority of devices anyway, so the autosizing becomes a backup. This comes at a cost of 8dp for the team name, but the number is probably more important anyway, and the vast majority of team names should still fit reasonably well.
Theoretically you could make a device where the team number will now be truncated, but it would have to be a very wonky device.
As an added bonus, I also moved some hardcoded android:text values used for the layout preview to tools:text, and added a right padding to team numbers for better symmetry when the team number is 4 digits.
Issues Reference:
Resolves #901
Test Plan:
Tested with 2, 3, 4, and 5 digit team numbers on a few different devices to see what we would get.
Screenshots:
Here's what it looks like when everything fits fine:
Here's what we get if 4 digit team numbers need to scale down a hair to fit:
Summary: Two pronged approach to keeping team numbers on a single line:
Theoretically you could make a device where the team number will now be truncated, but it would have to be a very wonky device.
As an added bonus, I also moved some hardcoded
android:text
values used for the layout preview totools:text
, and added a right padding to team numbers for better symmetry when the team number is 4 digits.Issues Reference: Resolves #901
Test Plan: Tested with 2, 3, 4, and 5 digit team numbers on a few different devices to see what we would get.
Screenshots:
Here's what it looks like when everything fits fine:
Here's what we get if 4 digit team numbers need to scale down a hair to fit: