mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-13 22:03:13 -06:00
fix(android): visible D-pad focus stroke on setup buttons (#218)
The setup screen buttons used a bare <ripple> which only reacts to state_pressed (touch). D-pad navigation triggers state_focused, which the ripple ignored, leaving the focused button nearly invisible against the dark background from TV viewing distance. Wrap the button shape in a <selector> (kept inside the ripple so touch still gets the press ripple) that adds a bright 3dp white stroke on state_focused. Closes #209 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e7483dfc24
commit
11c2890433
|
|
@ -1,10 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Keeps the touch press ripple, and adds a high-contrast white stroke on
|
||||
state_focused so D-pad navigation on Android TV is visible from across the
|
||||
room (the bare <ripple> only reacted to state_pressed). See issue #209.
|
||||
-->
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#2563EB">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#3B82F6" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
<selector>
|
||||
<item android:state_focused="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#3B82F6" />
|
||||
<stroke android:width="3dp" android:color="#FFFFFF" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#3B82F6" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
||||
|
|
|
|||
Loading…
Reference in a new issue