mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-09 18:48:51 -06:00
Enforce min text size on HabitScoreView
This commit is contained in:
@@ -156,8 +156,10 @@ public class HabitScoreView extends ScrollableDataView implements HabitDataView
|
||||
{
|
||||
if(height < 9) height = 200;
|
||||
|
||||
int maxTextSize = getResources().getDimensionPixelSize(R.dimen.regularTextSize);
|
||||
pText.setTextSize(Math.min(height * 0.047f, maxTextSize));
|
||||
float minTextSize = getResources().getDimension(R.dimen.tinyTextSize);
|
||||
float maxTextSize = getResources().getDimension(R.dimen.regularTextSize);
|
||||
float textSize = height * 0.045f;
|
||||
pText.setTextSize(Math.max(Math.min(textSize, maxTextSize), minTextSize));
|
||||
em = pText.getFontSpacing();
|
||||
|
||||
footerHeight = (int)(3 * em);
|
||||
|
||||
Reference in New Issue
Block a user