Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)?

like image 615
cloud Avatar asked May 09 '11 14:05

cloud


1 Answers

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

like image 195
Mojo Risin Avatar answered Nov 15 '22 00:11

Mojo Risin