From 030226f288b37cbdbc300d627705015173b470a6 Mon Sep 17 00:00:00 2001 From: Taco Date: Wed, 13 Mar 2024 15:14:07 -0400 Subject: Replace SwitchCompat with MaterialSwitch (#6989) --- .../fragment/preferences/dialog/PreferenceSwitchDialog.java | 4 ++-- app/src/main/res/layout/dialog_switch_preference.xml | 2 +- app/src/main/res/layout/swipeactions_dialog.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/dialog/PreferenceSwitchDialog.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/dialog/PreferenceSwitchDialog.java index 69319c11e..10fbe6137 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/dialog/PreferenceSwitchDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/dialog/PreferenceSwitchDialog.java @@ -5,7 +5,7 @@ import android.view.LayoutInflater; import android.view.View; import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import androidx.appcompat.widget.SwitchCompat; +import com.google.android.material.materialswitch.MaterialSwitch; import de.danoeh.antennapod.R; @@ -38,7 +38,7 @@ public class PreferenceSwitchDialog { LayoutInflater inflater = LayoutInflater.from(this.context); View layout = inflater.inflate(R.layout.dialog_switch_preference, null, false); - SwitchCompat switchButton = layout.findViewById(R.id.dialogSwitch); + MaterialSwitch switchButton = layout.findViewById(R.id.dialogSwitch); switchButton.setText(text); builder.setView(layout); diff --git a/app/src/main/res/layout/dialog_switch_preference.xml b/app/src/main/res/layout/dialog_switch_preference.xml index 87f321c86..45fe21a90 100644 --- a/app/src/main/res/layout/dialog_switch_preference.xml +++ b/app/src/main/res/layout/dialog_switch_preference.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" android:padding="24dp"> - -