progress-indicator-as-scrubber
A scrubber made from a progress indicator
Two layers in one box: the indicator draws, and a transparent gesture layer over it maps positions to a fraction. You own the hit area, the arbitration and the thumb — which is the whole reason to do it this way.
Reach for custom-thin-media-slider instead when the platform slider can render what you want and
you only need custom track and thumb slots; it keeps the accessibility semantics and the keyboard
handling for free. Come here when the visual has no slider counterpart, or when you need a hit area
and a consumption policy the slider does not expose — and then accept that semantics are now yours to
add.
Traps
The hit area is a separate size from the visual, and it is the one thing a slider will not give you. A few-pixels-tall line is unhittable. Put the indicator inside a box with a comfortable height (40dp here), centre it, and hang the gestures on the box: