Merge "Make taps on the row toggle switches"
This commit is contained in:
committed by
Android (Google) Code Review
commit
daa5ac49ac
@@ -46,7 +46,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:orientation="horizontal" >
|
||||
android:clickable="true"
|
||||
android:orientation="horizontal"
|
||||
android:foreground="?android:attr/selectableItemBackground" >
|
||||
|
||||
<!-- This is where an icon would go *if we wanted one* **wink** -->
|
||||
<Space
|
||||
|
||||
@@ -129,6 +129,8 @@ class AppControlView(c: Context, attrs: AttributeSet) : LinearLayout(c, attrs) {
|
||||
iconView = findViewById(R.id.icon)
|
||||
channelName = findViewById(R.id.app_name)
|
||||
switch = findViewById(R.id.toggle)
|
||||
|
||||
setOnClickListener { switch.toggle() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,6 +158,7 @@ class ChannelRow(c: Context, attrs: AttributeSet) : LinearLayout(c, attrs) {
|
||||
controller.proposeEditForChannel(it, if (b) it.importance else IMPORTANCE_NONE)
|
||||
}
|
||||
}
|
||||
setOnClickListener { switch.toggle() }
|
||||
}
|
||||
|
||||
private fun updateViews() {
|
||||
|
||||
Reference in New Issue
Block a user