Android animation ListView touch animation is gone when onClickListener is on

I have a ListView with a custom layout for children.

Without snapping to OnClickListener elements, each element is highlighted beautifully when the user touches it, but as soon as I attach the listener, the animation disappears. The listener works, but then there is no animation or visual feedback. The same problem occurs when I use OnTouchListener.

What can I do to capture an onClick event, but still has a default animation?

+5
source share
1 answer

ListView OnItemClickListener. OnClickListener, . OnClickListener executeItemClick.

+4

Source: https://habr.com/ru/post/1570079/


All Articles