开发者

android: Dynamic checkbox inside listview

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜