From 07116b4f4c46c845035deef630d9ff36d1d7143f Mon Sep 17 00:00:00 2001
From: Torsten Grote <t@grobox.de>
Date: Mon, 24 Jun 2024 10:24:46 -0300
Subject: [PATCH] Use MD3 switches for files backup config

---
 .../calyxos/backup/storage/ui/backup/BackupContentAdapter.kt  | 4 ++--
 storage/lib/src/main/res/layout/item_media.xml                | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/storage/lib/src/main/java/org/calyxos/backup/storage/ui/backup/BackupContentAdapter.kt b/storage/lib/src/main/java/org/calyxos/backup/storage/ui/backup/BackupContentAdapter.kt
index 854df079..50d8fd35 100644
--- a/storage/lib/src/main/java/org/calyxos/backup/storage/ui/backup/BackupContentAdapter.kt
+++ b/storage/lib/src/main/java/org/calyxos/backup/storage/ui/backup/BackupContentAdapter.kt
@@ -12,9 +12,9 @@ import android.view.ViewGroup
 import android.widget.ImageButton
 import android.widget.ImageView
 import android.widget.TextView
-import androidx.appcompat.widget.SwitchCompat
 import androidx.recyclerview.widget.RecyclerView
 import androidx.recyclerview.widget.RecyclerView.Adapter
+import com.google.android.material.materialswitch.MaterialSwitch
 import org.calyxos.backup.storage.R
 import org.calyxos.backup.storage.api.EXTERNAL_STORAGE_PROVIDER_AUTHORITY
 
@@ -65,7 +65,7 @@ internal class BackupContentAdapter(private val listener: ContentClickListener)
     }
 
     internal inner class MediaHolder(view: View) : ViewHolder(view) {
-        private val switch: SwitchCompat = view.findViewById(R.id.switchView)
+        private val switch: MaterialSwitch = view.findViewById(R.id.switchView)
 
         override fun bind(item: BackupContentItem) {
             super.bind(item)
diff --git a/storage/lib/src/main/res/layout/item_media.xml b/storage/lib/src/main/res/layout/item_media.xml
index 7c357472..71db589b 100644
--- a/storage/lib/src/main/res/layout/item_media.xml
+++ b/storage/lib/src/main/res/layout/item_media.xml
@@ -42,7 +42,7 @@
             app:layout_constraintTop_toTopOf="parent"
             tools:text="@string/content_videos" />
 
-        <androidx.appcompat.widget.SwitchCompat
+        <com.google.android.material.materialswitch.MaterialSwitch
             android:id="@+id/switchView"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"