开发者

android: Dynamic checkbox inside listview

开发者 https://www.devze.com 2023-03-27 17:16 出处:网络
I need to display a checkbox dynamically in a listview (one checkbox per list item) based on menu option selction.

I need to display a checkbox dynamically in a listview (one checkbox per list item) based on menu option selction.

Please suggest me the best way to implement it.

开发者_如何转开发

Thanks, nehatha


If you create a custom View, you can place a checkbox within that view. Then in the getView, you can check the sentinel to determine if that check box should be VISIBLE or GONE


If I understood you well here is an example, how to achieve it:

http://www.androidpeople.com/android-listview-multiple-choice-example

0

精彩评论

暂无评论...
验证码 换一张
取 消