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>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user