Files
clockula/app/src/main/res/layout/widget_preview_quick_timer.xml
T
makiolaj acd99964ae fix(widgets): keep android:tint in picker previews, suppress UseAppTint
The previews are inflated as RemoteViews by the launcher, where AppCompat's
app:tint never applies, so lint's suggested fix would drop the tint.
2026-10-02 19:18:14 +02:00

48 lines
1.8 KiB
XML

<?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. -->
<!-- android:tint, not app:tint: the launcher inflates this as RemoteViews,
where AppCompat attributes never apply. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="UseAppTint"
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>