I have a ListView with a custom layout for the child items.
Without the OnClickListener attached to the items each item highlights nicely when the user touches it but as soon as I attach the listener the animation is gone. The listener is working but then there is no animation or visual feedback. The same problem occurs when I use an OnTouchListener.
What can I do to grab the onClick-Event but still have the default animation?
With ListView you should use OnItemClickListener. If there's is a specific reason for using OnClickListener, you can manually fire the item click event. In your OnClickListener call performItemClick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With