Files
clockula/app/src/main/res/drawable/widget_analog_dial_clover.xml
T
makiolaj 82fff19d3d feat(widgets): M3 Expressive widget lineup — analog, digital, stopwatch, quick timer
Six widgets, each with minimal settings, styled with M3 Expressive shapes and
Material You colours, and sized proportionally to the placed widget
(SizeMode.Exact + LocalSize):

- Analog clock (new): nine faces on MaterialShapes dials (Round, Numeral,
  Day, Cookie, Sunny, Scallop, Clover, Square, Petal) with per-face hands,
  a seconds dot and Google-Clock-style orbiting date on some faces, and a
  day/date pill on others. Style picker previews inflate the real views.
- Digital clock: rebuilt as RemoteViews faces (Classic, Thin, Bold, Pill,
  Stacked) shared by the widget and its config previews; world clocks are
  opt-in and only on the card faces.
- Next alarm and Timers: shape badges, icon buttons, proportional readouts;
  a lone timer on a tall widget gets a stacked layout.
- Stopwatch (new): large readout with play/pause pill and lap/reset.
- Quick timer (new): a Scallop that is a timer of its own — tap to start a
  transient timer of its configured duration, tap again to reset/stop.

Colours resolve in the launcher (widget_* palette resources, GlanceTheme's
dynamic colours) so widgets follow day/night and the wallpaper. Data widgets
collect their flows inside the composition so a live Glance session never
shows stale state, chronometer bases use elapsedRealtime, and config
activities close cleanly on an invalid widget id.
2026-10-02 18:01:11 +02:00

20 lines
1011 B
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Clover dial: `MaterialShapes.Clover4Leaf`'s cubics, normalized and laid
into this 100x100 viewport at 2..98 (generated once from the library's
own polygon, so it is the real M3 Expressive shape, not a lookalike).
Turned 45° so the lobes sit at 12/3/6/9 under the numerals, and scaled
to 0.88 so the turned lobes stay inside the viewport. Drawn by the dial
`ImageView` of `widget_analog_*.xml`; see `widget_analog_hour_hand.xml`
for the 480dp intrinsic size. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="480dp"
android:height="480dp"
android:viewportWidth="100"
android:viewportHeight="100">
<group android:pivotX="50" android:pivotY="50" android:rotation="45" android:scaleX="0.88" android:scaleY="0.88">
<path
android:pathData="@string/widget_shape_path_clover"
android:fillColor="@color/widget_analog_dial_primary" />
</group>
</vector>