summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java/com
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2023-03-25 23:58:06 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2023-03-25 23:58:06 +0100
commitf13624c58f0b8b46d3fd9958fe83f1631736cd45 (patch)
tree3112500a0ca64558b52903394b5d1f395c73df25 /ui/src/main/java/com
parent497a60cc90e6559111e6564e8723f87c0df4632c (diff)
ui: switch from SwitchMaterial to MaterialSwitch
This required some weird changes to prevent clipping on the top, because apparently the new switch is a bit fatter. I think this actually looks a bit uglier than before, but it seems like that's what Material design wants. Maybe we can improve it? Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java/com')
-rw-r--r--ui/src/main/java/com/wireguard/android/widget/ToggleSwitch.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/src/main/java/com/wireguard/android/widget/ToggleSwitch.kt b/ui/src/main/java/com/wireguard/android/widget/ToggleSwitch.kt
index b0eae4d0..0bde810d 100644
--- a/ui/src/main/java/com/wireguard/android/widget/ToggleSwitch.kt
+++ b/ui/src/main/java/com/wireguard/android/widget/ToggleSwitch.kt
@@ -8,9 +8,9 @@ package com.wireguard.android.widget
import android.content.Context
import android.os.Parcelable
import android.util.AttributeSet
-import com.google.android.material.switchmaterial.SwitchMaterial
+import com.google.android.material.materialswitch.MaterialSwitch
-class ToggleSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : SwitchMaterial(context, attrs) {
+class ToggleSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : MaterialSwitch(context, attrs) {
private var isRestoringState = false
private var listener: OnBeforeCheckedChangeListener? = null
override fun onRestoreInstanceState(state: Parcelable) {