I am working on an android application and I am trying to follow the guidelines for the Ice Cream Sandwich UI.
I have a ListActivity which contains a ListView and within the ListView I am have a TextView for each item within an ArrayAdapter. When I want to be able to do, is once the user long clicks on an item within the ListView and Context Activity Bar is shown and the item that was long clicked is now in a selected state. From there the user can then click on multiple items within the ListView making them all selected and then the user can press a button within the ActionBar to perform an action on all selected items within the ListView.
I’ve got it triggering to show the context activity bar when the item is long clicked but I have no idea how I can make the item appear selected and allow the user to select/deselect the items within the ListView.
Thanks for your help
Do as is described here.
How to highlight selected item in ListView?
Basically you need to set the multiselect listener and then selection type. Do what you need from the actionmode callbacks