The standard ListView selector in the android L preview preview uses colorControlHighlight for a pulsating touch effect and has a transparent background in an unfocused state.
I would like to define a ListView element that has a colored background and still shows a ripple effect when touched with the same highlight color. Now, if I define the following valid:
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight"> <item android:drawable="@color/my_background_color"/> </ripple>
it works, but the ripple starts in the middle of the ListView , regardless of the position of the touch. If I use the same background outside the ListView , for example. with a LinearLayout it works as expected (ripple starts at the touch position).
android android-5.0-lollipop listview material-design rippledrawable
Artjom KΓΆnig Aug 22 '14 at 9:14 2014-08-22 09:14
source share