简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM