touch-feedback

Blue highlight over an ImageView when the user taps it

本小妞迷上赌 提交于 2019-12-22 06:27:52
问题 I have a LinearLayout "card" with an ImageView and a TextView. I want the card to be highlighted when the user taps it. See http://www.youtube.com/watch?v=Yx1l9Y7GIk8&feature=share&t=15m17s for an example. This is easily done for the TextView by setting android:background="@drawable/blue_highlight" . Below is res/drawable/blue_highlight.xml: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_selected="true" android

Blue highlight over an ImageView when the user taps it

ⅰ亾dé卋堺 提交于 2019-12-05 09:51:56
I have a LinearLayout "card" with an ImageView and a TextView. I want the card to be highlighted when the user taps it. See http://www.youtube.com/watch?v=Yx1l9Y7GIk8&feature=share&t=15m17s for an example. This is easily done for the TextView by setting android:background="@drawable/blue_highlight" . Below is res/drawable/blue_highlight.xml: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_selected="true" android:drawable="@color/selected"/> <item android:state_pressed="true" android:drawable="@color/pressed"/>

Touch feedback with RecyclerView and CardView

一笑奈何 提交于 2019-11-28 02:54:57
I would love to enable touch feedback for my Open-Source library. I've created a RecyclerView and a CardView . The CardView contains different areas with different onClick actions. Now I would love to trigger the Ripple effect if a user clicks anywhere in the card, but I'm not able to achieve this behavior. This is my listitem, You can find it on GitHub too: https://github.com/mikepenz/AboutLibraries/blob/master/library/src/main/res/layout/listitem_opensource.xml <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:background

Touch feedback with RecyclerView and CardView

社会主义新天地 提交于 2019-11-26 23:52:55
问题 I would love to enable touch feedback for my Open-Source library. I've created a RecyclerView and a CardView . The CardView contains different areas with different onClick actions. Now I would love to trigger the Ripple effect if a user clicks anywhere in the card, but I'm not able to achieve this behavior. This is my listitem, You can find it on GitHub too: https://github.com/mikepenz/AboutLibraries/blob/master/library/src/main/res/layout/listitem_opensource.xml <RelativeLayout android