Skip to content

Commit

Permalink
Adopt the new look of Switch
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Oct 23, 2022
1 parent c977087 commit f495987
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import android.widget.TextView
import androidx.core.widget.ImageViewCompat
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.slider.Slider
import com.google.android.material.switchmaterial.SwitchMaterial
import com.google.android.material.materialswitch.MaterialSwitch
import space.celestia.mobilecelestia.R
import space.celestia.mobilecelestia.common.*
import java.lang.ref.WeakReference
Expand Down Expand Up @@ -174,7 +174,7 @@ class SettingsCommonRecyclerViewAdapter(
inner class SwitchViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val title: TextView
get() = itemView.findViewById(R.id.title)
val switch: SwitchMaterial
val switch: MaterialSwitch
get() = itemView.findViewById(R.id.accessory)

fun configure(text:String, isChecked: Boolean, stateChangeCallback: (Boolean) -> Unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_marginVertical="@dimen/list_item_medium_margin_vertical"
style="@style/PrimaryListItemLabel"/>

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/accessory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
ext.kotlin_version = '1.7.20'
ext.core_ktx_version = '1.9.0'
ext.core_appcompat_version = '1.5.1'
ext.material_version = '1.6.1'
ext.material_version = '1.7.0'
ext.kotlinx_coroutines_version = '1.6.4'
ext.hilt_version = '2.44'
ext.lifecycle_version = '2.5.1'
Expand Down

0 comments on commit f495987

Please sign in to comment.