开发者

checkbox android listview

开发者 https://www.devze.com 2023-04-01 01:19 出处:网络
Now adding check boxes to a list is really easy. My question is what if we want to add checkboxes to certai开发者_C百科n items in the list.

Now adding check boxes to a list is really easy. My question is what if we want to add checkboxes to certai开发者_C百科n items in the list. Say I have a filesystem and I wanna give a checkbox only to the files but not the folders.

That is the best way to go about this ? Should I add it as a view and set that row's tags.

Any ideas.

THanks in advanced.


I would add a custom view to the list: The custom view should have a Linear Layout (horizontal) and 2 items: checkbox and textview. If you want to remove the checkbox, change the visibility of the checkbox to GONE on folders (in the getView method of your custom adapter). See here for a similar example: http://appfulcrum.com/?p=351

0

精彩评论

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

关注公众号