Disable ripple effect on Listview

I have a simple list containing some lists. Currently, to make the elements pulsate to the touch, I just added android:drawSelectorOnTop="true"

to the list.

This works great.

However, some list items are headers and should not show ripples because they have no action associated with them. How can I turn off the ripple effect for titles only?

The list contains line outputs for lines and headers.

I've tried the following in the title with no success:

  • setting clickable

    to false
  • setting listSelector

    to null.
  • setting focusable

    to false.

Can anyone point me in the right direction?

+3


source to share


1 answer


Possibly a duplicate question . But as a summary: try disabling these items in your adapter. You can use . AreAllItemsEnabled () and . IsEnabled () for this purpose.



+3


source







All Articles