J
J
Jackass722017-03-14 14:14:27
Android
Jackass72, 2017-03-14 14:14:27

How to make a click animation on a ListView item on top of an image?

In general there is a ListView with an ImageView and a TextView. When clicking or long pressing, the animation is visible, but if you stretch the image over the entire item, then this animation is not visible. What to do so that the animation is on top of the image? Or is it necessary to use a non-ListView for this? NtjxrL_GXeI.jpg
Should be like thissTZ8liMieLU.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jackass72, 2017-03-14
@Jackass72

Everything solved the problem. It was necessary to specify android:foreground="?android:attr/selectableItemBackground". But this was not enough, I had to wrap everything in a CardView and indicate it there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question