mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Use MD3 switches
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
app:tint="?attr/colorControlNormal"
|
app:tint="?attr/colorControlNormal"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
android:id="@+id/switchDisappearingMessages"
|
android:id="@+id/switchDisappearingMessages"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
android:id="@+id/switchCompat"
|
android:id="@+id/switchCompat"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
9
briar-android/src/main/res/layout/preference_switch.xml
Normal file
9
briar-android/src/main/res/layout/preference_switch.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?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:focusable="false"
|
||||||
|
android:clickable="false"
|
||||||
|
android:background="@null" />
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<style name="BriarToolbar" parent="Widget.Material3.Toolbar">
|
<style name="BriarToolbar" parent="Widget.Material3.Toolbar">
|
||||||
<item name="android:background">@color/briar_primary</item>
|
<item name="android:background">@color/briar_primary</item>
|
||||||
@@ -163,4 +163,10 @@
|
|||||||
<item name="srcCompat">@drawable/ic_check_white</item>
|
<item name="srcCompat">@drawable/ic_check_white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Preference.SwitchPreferenceCompat"
|
||||||
|
parent="@style/Preference.SwitchPreferenceCompat.Material"
|
||||||
|
tools:ignore="ResourceCycle">
|
||||||
|
<item name="widgetLayout">@layout/preference_switch</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<item name="windowActionModeOverlay">true</item>
|
<item name="windowActionModeOverlay">true</item>
|
||||||
<item name="toolbarStyle">@style/BriarToolbar</item>
|
<item name="toolbarStyle">@style/BriarToolbar</item>
|
||||||
<item name="alertDialogTheme">@style/BriarDialogTheme.Neutral</item>
|
<item name="alertDialogTheme">@style/BriarDialogTheme.Neutral</item>
|
||||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
|
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="BriarTheme.NoActionBar" parent="BriarTheme">
|
<style name="BriarTheme.NoActionBar" parent="BriarTheme">
|
||||||
|
|||||||
Reference in New Issue
Block a user