Now adding check boxes to a list is really easy.
My question is what if we want to add checkboxes to certain 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