'At a glance' predated the Tasks widget's M3 Expressive redesign and only duplicated a subset of what Tasks already shows (today's tasks), so it's gone rather than patched up. In its place, four widgets that each do something Tasks structurally can't: - Today: a progress ring for done vs. still-open-today tasks - Up next: the single nearest due task, as a countdown - Lists: a shortcut tile per list, with its own open count - Week: a seven-day strip of per-day task counts Shared data lives in WidgetStats.kt (pure, unit-tested); the config activity is now kind-aware per widget provider, and the task-row building blocks (AgendaTaskRow, the row mapper) are shared rather than duplicated. Needs the floret-kit bump for WidgetProgressRing/WidgetTile /WidgetCheckButton.
42 lines
1.5 KiB
XML
42 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Static mock shown in the widget picker (android:previewLayout); the live
|
|
widget is rendered by Glance. -->
|
|
<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:orientation="vertical"
|
|
android:background="@drawable/preview_widget_bg"
|
|
android:padding="10dp"
|
|
tools:ignore="HardcodedText,UseAppTint">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/smart_today"
|
|
android:textColor="@color/widget_preview_primary"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold" />
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_marginTop="4dp">
|
|
<ImageView
|
|
android:layout_width="72dp"
|
|
android:layout_height="72dp"
|
|
android:layout_gravity="center"
|
|
android:contentDescription="@null"
|
|
android:background="@drawable/preview_ring" />
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:text="4/6"
|
|
android:textColor="@color/widget_preview_on_surface"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold" />
|
|
</FrameLayout>
|
|
</LinearLayout>
|