feat(widgets): stopwatch style picker and widget-picker previews
The stopwatch widget gets a per-instance style, chosen in a new StopwatchConfigActivity on the APPWIDGET_CONFIGURE contract. Every widget receiver now carries its own label, with a separate description, and the widget picker shows sample-value preview layouts instead of a bare name.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- The widget picker's preview of the quick-timer widget (`previewLayout`,
|
||||
API 31+): a static stand-in for `ui/widget/QuickTimerWidgetContent.kt`
|
||||
at rest — the Scallop with a play glyph over its default 05:00. -->
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:importantForAccessibility="no"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/widget_shape_scallop"
|
||||
android:tint="@color/widget_primary_container" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/widget_ic_play"
|
||||
android:tint="@color/widget_on_primary_container" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="@string/widget_preview_quick_timer_time"
|
||||
android:textColor="@color/widget_on_primary_container"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user