mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-08 10:08:51 -06:00
Merge pull request #174 from Donaira/dev
Increase width of name column according to screen size
This commit is contained in:
@@ -166,7 +166,7 @@ public class ListHabitsRootView extends BaseRootView
|
|||||||
private int getCheckmarkCount()
|
private int getCheckmarkCount()
|
||||||
{
|
{
|
||||||
Resources res = getResources();
|
Resources res = getResources();
|
||||||
float labelWidth = res.getDimension(R.dimen.habitNameWidth);
|
float labelWidth = Math.max(getMeasuredWidth() / 3, res.getDimension(R.dimen.habitNameWidth));
|
||||||
float buttonWidth = res.getDimension(R.dimen.checkmarkWidth);
|
float buttonWidth = res.getDimension(R.dimen.checkmarkWidth);
|
||||||
return Math.min(MAX_CHECKMARK_COUNT, Math.max(0,
|
return Math.min(MAX_CHECKMARK_COUNT, Math.max(0,
|
||||||
(int) ((getMeasuredWidth() - labelWidth) / buttonWidth)));
|
(int) ((getMeasuredWidth() - labelWidth) / buttonWidth)));
|
||||||
|
|||||||
Reference in New Issue
Block a user