开发者

android select multiple items in ListView?

I have a ListVi开发者_C百科ew and I want to select multiple items in the ListView without using CheckedTextView.

Please help !!


You don't really need a CheckBox. All you need is a boolean flag on your list objects. When the user clicks an item you change the state of the flag, and probably the background or text color for that list item.


I never tried it, but I would use ListView with checkbox but non visible. Perform the setChecked(True) when the user press on an item. I would also try changing the item background when the checkbox is checked.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜