This commit is contained in:
Benoit Marty 2020-08-28 18:05:07 +02:00
parent 1af45ede62
commit e8e1330cd5
4 changed files with 6 additions and 7 deletions

View file

@ -16,13 +16,13 @@
package im.vector.app.features.discovery
import android.view.View
import android.widget.Switch
import android.widget.TextView
import androidx.annotation.StringRes
import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import com.google.android.material.switchmaterial.SwitchMaterial
import im.vector.app.R
import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.extensions.setTextOrHide
@ -69,6 +69,6 @@ abstract class SettingsItem : EpoxyModelWithHolder<SettingsItem.Holder>() {
class Holder : VectorEpoxyHolder() {
val titleText by bind<TextView>(R.id.settings_item_title)
val descriptionText by bind<TextView>(R.id.settings_item_description)
val switchButton by bind<Switch>(R.id.settings_item_switch)
val switchButton by bind<SwitchMaterial>(R.id.settings_item_switch)
}
}

View file

@ -18,7 +18,6 @@ package im.vector.app.features.discovery
import android.widget.Button
import android.widget.CompoundButton
import android.widget.ProgressBar
import android.widget.Switch
import android.widget.TextView
import androidx.annotation.StringRes
import androidx.core.content.ContextCompat
@ -27,6 +26,7 @@ import androidx.core.view.isVisible
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import com.google.android.material.switchmaterial.SwitchMaterial
import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder
@ -160,7 +160,7 @@ abstract class SettingsTextButtonSingleLineItem : EpoxyModelWithHolder<SettingsT
class Holder : VectorEpoxyHolder() {
val textView by bind<TextView>(R.id.settings_item_text)
val mainButton by bind<Button>(R.id.settings_item_button)
val switchButton by bind<Switch>(R.id.settings_item_switch)
val switchButton by bind<SwitchMaterial>(R.id.settings_item_switch)
val progress by bind<ProgressBar>(R.id.settings_item_progress)
}
}

View file

@ -51,7 +51,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
<Switch
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/settings_item_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -21,7 +21,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:orientation="vertical"
android:textColor="?android:textColorPrimary"
android:textSize="15sp"
android:textStyle="bold"
@ -38,7 +37,7 @@
tools:text="Description / Value" />
</LinearLayout>
<Switch
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/settings_item_switch"
android:layout_width="50dp"
android:layout_height="50dp"