Date widget: 1×1 weekday and day number on a cookie shape, opens today (#376)

This commit is contained in:
makiolaj committed 2026-10-23 18:51:49 +02:00
1 parent 85d4dc535c
commit cfcba283f1
8 files changed
+208 -2

No files matched your search

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Static mock shown in the widget picker (android:previewLayout). -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/preview_widget_bg"
android:gravity="center"
android:orientation="vertical"
android:padding="4dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="WED"
android:textColor="@color/widget_preview_on_surface"
android:textSize="11sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<FrameLayout
android:layout_width="48dp"
android:layout_height="48dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:importantForAccessibility="no"
android:src="@drawable/floret_widget_shape_cookie"
android:tint="@color/widget_preview_primary"
tools:ignore="UseAppTint" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="7"
android:textColor="@color/widget_preview_on_primary"
android:textSize="22sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</FrameLayout>
</LinearLayout>
+1
View File
@@ -436,6 +436,7 @@
<string name="widget_agenda_label">Calendula agenda</string>
<string name="widget_month_label">Calendula month</string>
<string name="widget_quick_add_label">Calendula quick add</string>
<string name="widget_date_label">Calendula date</string>
<string name="widget_refresh">Refresh</string>
<string name="widget_new_event">New event</string>
<string name="widget_needs_permission">Open Calendula to grant calendar access</string>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="40dp"
android:minHeight="40dp"
android:targetCellWidth="1"
android:targetCellHeight="1"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen"
android:configure="de.jeanlucmakiola.calendula.widget.config.WidgetConfigActivity"
android:widgetFeatures="reconfigurable"
android:description="@string/widget_date_label"
android:updatePeriodMillis="1800000"
android:previewLayout="@layout/widget_preview_date"
android:initialLayout="@layout/glance_default_loading_layout" />