i implement the ActionMode in my Android App with ActionBarSherlock.
With ABS it is possible to build a ActionMode before API 11 but the easy way with:
listView.setMultiChoiceModeListener( new MultiChoiceModeListener() ...
is not for app before API 11.
Has anybody a good way to build a Action Mode Context Menu before API 11?
I want to make a long click on a List Item and start the ActionMode in which i can click multiple items. On a simple click i show a detail site of the list item.
I use the registerForContext()
method but this make a simple and long click.
Has anybody a good tip for me.
EDIT
The solution for my question was following: On a long item click i active the action mode and save this in a variable. In the on item click method i implement a if-else statement with:
if( actionMode == null )
{
// open new activity or update second fragment
showDetails( itemPosition );
}
else
{
// update ui or close CAB if no item selected
showCAB( itemPosition );
}
The method showCAB( position ) update the selectedItem count, highlight item background and so on.