Code example for ActionMode

Methods: setTitle

0
	protected class ContentMultiChoiceModeListener implements AbsListView.MultiChoiceModeListener {
 
		@Override 
		public void onItemCheckedStateChanged(ActionMode actionMode, int position, long id, boolean state) {
			listAdapter.setChecked(position);
			actionMode.setTitle(Integer.toString(listAdapter.getCheckedCount()));
			listAdapter.notifyDataSetChanged();
		} 
 
		@Override 
		public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
			contentActionMode = actionMode;
			context.setTheme(R.style.Digipost_ActionMode);
			MenuInflater inflater = actionMode.getMenuInflater();
			inflater.inflate(R.menu.activity_main_content_context, menu);
			listAdapter.setCheckboxVisible(true);
 
			return true; 
		} 
 
		@Override