Make the whole cell clickable
This commit is contained in:
parent
ef0b438a89
commit
da9b9f4864
@ -44,6 +44,12 @@ abstract class FormSwitchItem : VectorEpoxyModel<FormSwitchItem.Holder>() {
|
||||
var summary: String? = null
|
||||
|
||||
override fun bind(holder: Holder) {
|
||||
holder.view.setOnClickListener {
|
||||
if (enabled) {
|
||||
holder.switchView.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
holder.titleView.text = title
|
||||
holder.summaryView.setTextOrHide(summary)
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?riotx_background"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:minHeight="@dimen/item_form_min_height">
|
||||
|
||||
<TextView
|
||||
|
Loading…
x
Reference in New Issue
Block a user