I’m developing a Androidapplication using ListView.
ListView have a one file in each and every ListItem. Here, I have set onItemClickin ListView. So, that if user clicks the ListItememail application gets open and attach the particular file in email. Its for the single File, this gets implemented and working fine.
Now I want attach the multiple file in email. i.e. the implementing the CheckBoxin each ListItemand checked items have to attached into the Mail.
I know its possible because its very similar to the file manager application that checking the multiple file and deleting the all file by clicking the single Button. But don’t know how to do.
In you ListAdapter create a SparseBooleanArray
This SparseBooleanArray stores the checked items. Now in getView do the following
This is the class ViewCache
This method checks whether the position is checked
This is the onCheckChangeListener
Finally you can get the checked items from the SparseBooleanArray checkStatus. Think it will help you.