mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Replace Switch with SwitchMaterial (#6522)
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:
parent
b5b5d8a8e4
commit
29b6d0f8fe
2 changed files with 3 additions and 3 deletions
|
|
@ -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>
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue