style: implement m3 switches
Implement a facimile of the new Material 3/You switches in the settings menu. There's no defined spec for this yet, so I just shamelessly ripped the implementation from Doodle.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorOnPrimary" android:state_checked="true" />
|
||||
<item android:color="?attr/colorSurfaceVariant" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorPrimary" android:state_checked="true" />
|
||||
<item android:color="?attr/colorOnSurfaceVariant" />
|
||||
</selector>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:bottom="4dp"
|
||||
android:left="4dp"
|
||||
android:right="4dp"
|
||||
android:top="4dp">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#000000" />
|
||||
<size
|
||||
android:width="20dp"
|
||||
android:height="20dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#000000" />
|
||||
<corners android:radius="56dp" />
|
||||
<size
|
||||
android:width="64dp"
|
||||
android:height="28dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -72,7 +72,7 @@
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Auxio.TitleSmallish" parent="TextAppearance.Material3.TitleSmall">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Auxio.LabelLarger" parent="TextAppearance.Auxio.LabelLarge">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
app:key="auxio_accent"
|
||||
app:title="@string/set_accent" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false"
|
||||
@@ -40,14 +40,14 @@
|
||||
app:summary="@string/set_lib_tabs_desc"
|
||||
app:title="@string/set_lib_tabs" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_SHOW_COVERS"
|
||||
app:summary="@string/set_show_covers_desc"
|
||||
app:title="@string/set_show_covers" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:defaultValue="false"
|
||||
app:dependency="KEY_SHOW_COVERS"
|
||||
app:iconSpaceReserved="false"
|
||||
@@ -55,7 +55,7 @@
|
||||
app:summary="@string/set_quality_covers_desc"
|
||||
app:title="@string/set_quality_covers" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:defaultValue="false"
|
||||
app:dependency="KEY_SHOW_COVERS"
|
||||
app:iconSpaceReserved="false"
|
||||
@@ -63,7 +63,7 @@
|
||||
app:summary="@string/set_round_covers_desc"
|
||||
app:title="@string/set_round_covers" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false"
|
||||
@@ -78,14 +78,14 @@
|
||||
app:layout="@layout/item_header"
|
||||
app:title="@string/set_audio">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_AUDIO_FOCUS"
|
||||
app:summary="@string/set_focus_desc"
|
||||
app:title="@string/set_focus" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_PLUG_MGT"
|
||||
@@ -116,14 +116,14 @@
|
||||
app:title="@string/set_song_mode"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="KEY_KEEP_SHUFFLE"
|
||||
app:summary="@string/set_keep_shuffle_desc"
|
||||
app:title="@string/set_keep_shuffle" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
@@ -131,7 +131,7 @@
|
||||
app:summary="@string/set_rewind_prev_desc"
|
||||
app:title="@string/set_rewind_prev" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
<org.oxycblt.auxio.settings.pref.M3SwitchPreference
|
||||
app:allowDividerBelow="false"
|
||||
app:defaultValue="false"
|
||||
app:iconSpaceReserved="false"
|
||||
|
||||
Reference in New Issue
Block a user