Commit b3de3be
committed
Fix: Update widget dimensions and bitmap scaling
This commit updates the minimum width and height of the `widget_fab` and `widget_home_apps` app widgets.
The `drawableToBitmap` function in `HomeAppsWidgetProvider.kt` has been refactored to:
- Take a single `maxSizePx` parameter to clamp both width and height.
- Ensure the created bitmap uses `ARGB_8888` configuration.
- Coerce bitmap dimensions to be at least 1px to prevent errors.
Specific changes:
- `app/src/main/res/xml/widget_fab_info.xml`: `android:minWidth` changed from `410dp` to `350dp`.
- `app/src/main/res/xml/widget_home_apps_info.xml`: `android:minWidth` changed from `410dp` to `350dp` and `android:minHeight` changed from `410dp` to `350dp`.
- `app/src/main/java/com/github/droidworksstudio/mlauncher/ui/widgets/home/HomeAppsWidgetProvider.kt`: `drawableToBitmap` method signature and implementation updated for better bitmap scaling and safety.1 parent 5465abc commit b3de3be
File tree
3 files changed
+15
-7
lines changed- app/src/main
- java/com/github/droidworksstudio/mlauncher/ui/widgets/home
- res/xml
3 files changed
+15
-7
lines changedLines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
143 | 149 | | |
144 | | - | |
| 150 | + | |
145 | 151 | | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| 156 | + | |
149 | 157 | | |
150 | 158 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments