Replace Switch with SwitchMaterial

Lint recommended replacing Switch with SwitchMaterial.
This was a very simple replacement, and I tested it in
the custom selector, where it is used, and it works as
it worked previously.
This commit is contained in:
Amir E. Aharoni 2025-10-16 15:31:24 -04:00
parent 7d96e94689
commit 14da03b999
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ProgressBar
import android.widget.Switch
import androidx.appcompat.app.AlertDialog
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible
@ -20,6 +19,7 @@ import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.switchmaterial.SwitchMaterial
import fr.free.nrw.commons.contributions.Contribution
import fr.free.nrw.commons.contributions.ContributionDao
import fr.free.nrw.commons.customselector.database.NotForUploadStatusDao
@ -82,7 +82,7 @@ class ImageFragment :
*/
private var selectorRV: RecyclerView? = null
private var loader: ProgressBar? = null
private var switch: Switch? = null
private var switch: SwitchMaterial? = null
lateinit var filteredImages: ArrayList<Image>
/**

View file

@ -6,7 +6,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?attr/mainBackground">
<Switch
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/switchWidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"