Make update items/photos highlight when they're clickable
- Highlighting used to work not because "stream_item_content" had the proper
background but because it was the default behavior for ListView items.
- Implement StreamItemAdapter.isEnabled() and make all list items disabled,
so they don't highlight when not necessary. i.e. when items don't have a
click listener set.
- Instead set a click listener to the "stream_item_content" view.
- And change the background to "?android:attr/selectableItemBackground",
which is the default background for list items.
- Also make photo views highlightable when they're clickable.
Bug 5180619
Change-Id: I06bff9d1a0e5385fa66edd4577ddefb43587621c
diff --git a/res/layout/stream_item_container.xml b/res/layout/stream_item_container.xml
index 1f96aad..a88dd9a 100644
--- a/res/layout/stream_item_container.xml
+++ b/res/layout/stream_item_container.xml
@@ -27,7 +27,7 @@
android:paddingBottom="@dimen/detail_update_section_item_last_row_extra_vertical_padding"
android:paddingLeft="@dimen/detail_update_section_item_horizontal_padding"
android:paddingRight="@dimen/detail_update_section_item_horizontal_padding"
- android:background="@drawable/list_selector"
+ android:background="?android:attr/selectableItemBackground"
/>
<View