mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-03 13:29:47 +01:00
using vector model for consistency
This commit is contained in:
parent
7df7df7541
commit
a815ac996b
@ -21,15 +21,15 @@ import android.widget.CompoundButton
|
|||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.airbnb.epoxy.EpoxyAttribute
|
import com.airbnb.epoxy.EpoxyAttribute
|
||||||
import com.airbnb.epoxy.EpoxyModelClass
|
import com.airbnb.epoxy.EpoxyModelClass
|
||||||
import com.airbnb.epoxy.EpoxyModelWithHolder
|
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.core.epoxy.ClickListener
|
import im.vector.app.core.epoxy.ClickListener
|
||||||
import im.vector.app.core.epoxy.VectorEpoxyHolder
|
import im.vector.app.core.epoxy.VectorEpoxyHolder
|
||||||
|
import im.vector.app.core.epoxy.VectorEpoxyModel
|
||||||
import im.vector.app.core.epoxy.onClick
|
import im.vector.app.core.epoxy.onClick
|
||||||
import im.vector.app.core.extensions.setHorizontalPadding
|
import im.vector.app.core.extensions.setHorizontalPadding
|
||||||
|
|
||||||
@EpoxyModelClass
|
@EpoxyModelClass
|
||||||
abstract class PolicyItem : EpoxyModelWithHolder<PolicyItem.Holder>() {
|
abstract class PolicyItem : VectorEpoxyModel<PolicyItem.Holder>(R.layout.item_policy) {
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var checked: Boolean = false
|
var checked: Boolean = false
|
||||||
|
|
||||||
@ -48,8 +48,6 @@ abstract class PolicyItem : EpoxyModelWithHolder<PolicyItem.Holder>() {
|
|||||||
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
|
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
|
||||||
var clickListener: ClickListener? = null
|
var clickListener: ClickListener? = null
|
||||||
|
|
||||||
override fun getDefaultLayout() = R.layout.item_policy
|
|
||||||
|
|
||||||
override fun bind(holder: Holder) {
|
override fun bind(holder: Holder) {
|
||||||
super.bind(holder)
|
super.bind(holder)
|
||||||
horizontalPadding?.let { holder.view.setHorizontalPadding(it) }
|
horizontalPadding?.let { holder.view.setHorizontalPadding(it) }
|
||||||
|
Loading…
Reference in New Issue
Block a user