mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-04 11:53:47 +00:00
[android] Add new custom switch for preference
Signed-off-by: jeanbaptisteC <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
Konstantin Pastbin
parent
9425138782
commit
4861ae7e67
9
android/app/src/main/res/layout/preference_switch.xml
Normal file
9
android/app/src/main/res/layout/preference_switch.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Derived from https://github.com/androidx/androidx/blob/8cb282cc/preference/preference/res/layout/preference_widget_switch_compat.xml -->
|
||||
<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" />
|
||||
@@ -379,4 +379,11 @@
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.Preference">
|
||||
<item name="switchPreferenceCompatStyle">@style/MwmWidget.SwitchPreferenceCompat</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.SwitchPreferenceCompat" parent="Preference.SwitchPreferenceCompat.Material">
|
||||
<item name="android:widgetLayout">@layout/preference_switch</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user