From bbfb7351243aa48ff620dd70ef50ed99ae0b01e8 Mon Sep 17 00:00:00 2001 From: Ricky Cheung Date: Wed, 26 Jun 2024 17:41:47 +0800 Subject: [PATCH] Enlarge the icons on wide widgets * Also move the case details to the centre and separate the text a little Signed-off-by: Ricky Cheung --- .../capod/main/ui/widget/WidgetProvider.kt | 4 +- .../layout/widget_pod_dual_wide_layout.xml | 66 ++++++++++--------- app/src/main/res/values/styles.xml | 5 ++ 3 files changed, 42 insertions(+), 33 deletions(-) diff --git a/app/src/main/java/eu/darken/capod/main/ui/widget/WidgetProvider.kt b/app/src/main/java/eu/darken/capod/main/ui/widget/WidgetProvider.kt index 4546b3fe..2d6f23f4 100644 --- a/app/src/main/java/eu/darken/capod/main/ui/widget/WidgetProvider.kt +++ b/app/src/main/java/eu/darken/capod/main/ui/widget/WidgetProvider.kt @@ -135,13 +135,13 @@ class WidgetProvider : AppWidgetProvider() { .getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH) val columns = getCellsForSize(minWidth) - /* Enable wide widgets only when we are provided with 4 or + /* Enable wide widgets only when we are provided with 5 or * more columns of space. * Although the minimum size is only 2x1, the safeguards are * added if these restrictions will ever be loosened in the future. */ val layout = when (columns) { - in 1 .. 3 -> R.layout.widget_pod_dual_compact_layout + in 1 .. 4 -> R.layout.widget_pod_dual_compact_layout else -> R.layout.widget_pod_dual_wide_layout } diff --git a/app/src/main/res/layout/widget_pod_dual_wide_layout.xml b/app/src/main/res/layout/widget_pod_dual_wide_layout.xml index 44f35303..de3068c6 100644 --- a/app/src/main/res/layout/widget_pod_dual_wide_layout.xml +++ b/app/src/main/res/layout/widget_pod_dual_wide_layout.xml @@ -14,12 +14,13 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:layout_marginEnd="24dp" + android:layout_marginEnd="12dp" + android:gravity="center_vertical" android:orientation="horizontal"> @@ -49,12 +50,41 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:layout_marginEnd="24dp" + android:layout_marginEnd="12dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + + + + + + + + + @@ -80,33 +110,6 @@ tools:ignore="ContentDescription" /> - - - - - - - - - ?android:attr/colorAccent + +