Merge "Make taps on the row toggle switches"
diff --git a/packages/SystemUI/res/layout/notif_half_shelf.xml b/packages/SystemUI/res/layout/notif_half_shelf.xml
index 26c8872..d36c1a8 100644
--- a/packages/SystemUI/res/layout/notif_half_shelf.xml
+++ b/packages/SystemUI/res/layout/notif_half_shelf.xml
@@ -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"
diff --git a/packages/SystemUI/res/layout/notif_half_shelf_row.xml b/packages/SystemUI/res/layout/notif_half_shelf_row.xml
index b95d5e9..c863e02 100644
--- a/packages/SystemUI/res/layout/notif_half_shelf_row.xml
+++ b/packages/SystemUI/res/layout/notif_half_shelf_row.xml
@@ -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
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorListView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorListView.kt
index 6faf77e..983315e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorListView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorListView.kt
@@ -129,6 +129,8 @@
iconView = findViewById(R.id.icon)
channelName = findViewById(R.id.app_name)
switch = findViewById(R.id.toggle)
+
+ setOnClickListener { switch.toggle() }
}
}
@@ -156,6 +158,7 @@
controller.proposeEditForChannel(it, if (b) it.importance else IMPORTANCE_NONE)
}
}
+ setOnClickListener { switch.toggle() }
}
private fun updateViews() {