Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable some items in listview which is in the Alert Dialog

I want to disable some items in ListView which is in the AlertDialog.

How may I do it?

like image 781
Chris Avatar asked Sep 08 '10 10:09

Chris


1 Answers

Supply your own custom ListAdapter to the AlertDialog.Builder via setAdapter(). You can then override areAllItemsEnabled() and isEnabled() to enable/disable whatever you want.

like image 127
CommonsWare Avatar answered Nov 19 '22 17:11

CommonsWare