Use MD3 switches in settings

This commit is contained in:
Torsten Grote 2024-06-24 10:14:47 -03:00 committed by Aayush Gupta
parent 98c6ebab8d
commit 0dcab41fd1
2 changed files with 13 additions and 1 deletions

View 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" />

View file

@ -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>