6

in my application, there is a listview, and clicking each item of it leads to an operation.

but in some situation, some operation can not be done.

how to disable a child item in a listview (make its color gray and unclickable)?

Matt Ball
  • 354,903
  • 100
  • 647
  • 710
cloud
  • 505
  • 1
  • 8
  • 21
  • 1
    possible duplicate of [How to disable items in a List View???](http://stackoverflow.com/questions/2662358/how-to-disable-items-in-a-list-view) and http://stackoverflow.com/questions/2907335/ and http://stackoverflow.com/questions/2183610 – Matt Ball May 09 '11 at 14:47

1 Answers1

10

You should override isEnabled in your adapter. Just keep track of the items you want to disable and return the correct value for them.

Mojo Risin
  • 8,136
  • 5
  • 45
  • 58