Use MD3 switches in settings
This commit is contained in:
parent
98c6ebab8d
commit
0dcab41fd1
2 changed files with 13 additions and 1 deletions
8
app/src/main/res/layout/preference_switch.xml
Normal file
8
app/src/main/res/layout/preference_switch.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.materialswitch.MaterialSwitch xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/switchWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />
|
|
@ -2,7 +2,7 @@
|
|||
SPDX-FileCopyrightText: 2020 The Calyx Institute
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="AppTheme" parent="@style/Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/accent_primary</item>
|
||||
|
@ -100,4 +100,8 @@
|
|||
<item name="android:minHeight">56dp</item>
|
||||
<item name="textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Preference.SwitchPreferenceCompat" parent="@style/Preference.SwitchPreferenceCompat.Material" tools:ignore="ResourceCycle">
|
||||
<item name="widgetLayout">@layout/preference_switch</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue