Skip to content

Commit e82bd47

Browse files
committed
Increase minimum widget size to 50x50 and 100x100
Some Samsung phones were allowing graph widgets to occupy 1x2 or 2x1 grid cells, leading to very small text. This commit bumps up the minimum widget size to 100x100 to ensure they always occupy at least 2x2 cells. Tested on Pixel 4, Pixel 7 and Samsung Galaxy S24. Closes #2118
1 parent e9517f7 commit e82bd47

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

uhabits-android/src/main/res/xml/widget_checkmark_info.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
-->
2020

2121
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
22-
android:minHeight="40dp"
23-
android:minWidth="40dp"
22+
android:minHeight="50dp"
23+
android:minWidth="50dp"
2424
android:initialLayout="@layout/widget_wrapper"
2525
android:previewImage="@drawable/widget_preview_checkmark"
2626
android:resizeMode="vertical|horizontal"

uhabits-android/src/main/res/xml/widget_frequency_info.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
-->
2020

2121
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
22-
android:minHeight="80dp"
23-
android:minWidth="80dp"
24-
android:minResizeWidth="80dp"
25-
android:minResizeHeight="80dp"
22+
android:minHeight="100dp"
23+
android:minWidth="100dp"
24+
android:minResizeWidth="100dp"
25+
android:minResizeHeight="100dp"
2626
android:initialLayout="@layout/widget_graph"
2727
android:previewImage="@drawable/widget_preview_frequency"
2828
android:resizeMode="vertical|horizontal"

uhabits-android/src/main/res/xml/widget_history_info.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
-->
2020

2121
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
22-
android:minHeight="80dp"
23-
android:minWidth="80dp"
24-
android:minResizeWidth="80dp"
25-
android:minResizeHeight="80dp"
22+
android:minHeight="100dp"
23+
android:minWidth="100dp"
24+
android:minResizeWidth="100dp"
25+
android:minResizeHeight="100dp"
2626
android:initialLayout="@layout/widget_graph"
2727
android:previewImage="@drawable/widget_preview_history"
2828
android:resizeMode="vertical|horizontal"

uhabits-android/src/main/res/xml/widget_score_info.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
-->
2020

2121
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
22-
android:minHeight="80dp"
23-
android:minWidth="80dp"
24-
android:minResizeWidth="80dp"
25-
android:minResizeHeight="80dp"
22+
android:minHeight="100dp"
23+
android:minWidth="100dp"
24+
android:minResizeWidth="100dp"
25+
android:minResizeHeight="100dp"
2626
android:initialLayout="@layout/widget_graph"
2727
android:previewImage="@drawable/widget_preview_score"
2828
android:resizeMode="vertical|horizontal"

uhabits-android/src/main/res/xml/widget_streak_info.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
-->
2020

2121
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
22-
android:minHeight="80dp"
23-
android:minWidth="80dp"
24-
android:minResizeWidth="80dp"
25-
android:minResizeHeight="80dp"
22+
android:minHeight="100dp"
23+
android:minWidth="100dp"
24+
android:minResizeWidth="100dp"
25+
android:minResizeHeight="100dp"
2626
android:initialLayout="@layout/widget_graph"
2727
android:previewImage="@drawable/widget_preview_streaks"
2828
android:resizeMode="vertical|horizontal"

uhabits-android/src/main/res/xml/widget_target_info.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
-->
2020

2121
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
22-
android:minHeight="80dp"
23-
android:minWidth="80dp"
24-
android:minResizeWidth="80dp"
25-
android:minResizeHeight="80dp"
22+
android:minHeight="100dp"
23+
android:minWidth="100dp"
24+
android:minResizeWidth="100dp"
25+
android:minResizeHeight="100dp"
2626
android:initialLayout="@layout/widget_graph"
2727
android:previewImage="@drawable/widget_preview_target"
2828
android:resizeMode="vertical|horizontal"

0 commit comments

Comments
 (0)