The Contextual Action Bar (CAB) is an action bar that displays actions for a particular task in an activity, such as editing or deleting multiple items in a list.
Questions tagged [android-cab]
6 questions
9
votes
1 answer
Android CAB destroying after listview notifydatasetchanged
I am using setMultiChoiceModeListener on Listview to invoke Action Mode for selecting multiple items to be deleted. On ListView scroll I load more data from server and notify the adapter. After adapter has been notified, the Action Mode (if invoked)…

Abid Khan
- 2,451
- 4
- 22
- 45
5
votes
4 answers
How do we show a back button instead of done(checkmark) button in the contextual action bar on Android
I am getting this by default
I want this
This should be trivial enough but I can't find anything related on Android docs.
private void setupContextualBar()
{
mActionModeCallback = new ActionMode.Callback()
{
//…

Varun Bhatia
- 4,326
- 32
- 46
2
votes
1 answer
Show ActionMode over ActionMode
I have a list activity in which the user can do open action modes A and B. The user can also open action mode A then B on top of it.
The problem is that when action mode A is shown and action mode B is shown on top of it, A gets closed automatically…

Nicolas
- 6,611
- 3
- 29
- 73
1
vote
2 answers
How to make Contextual Action Bar to appear at the bottom
I have created an activity and set toolbar as the actionbar which i have positioned at the bottom.
Inside that activity, I have a listview that contain some data.
Problem is, when I long press a list item, contextual action bar appears at the top…

Edijae Crusar
- 3,473
- 3
- 37
- 74
0
votes
1 answer
Contextual Action bar (Action mode) always gets destroyed when physical back button is pressed
So, I don't want to close Action mode on certain condition. so tried to do following
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (my condition) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
return true; //…

Apsaliya
- 136
- 3
- 10
0
votes
0 answers
Menu items are been pushed to overflow from contextual action bar when there is room
I have a contextual action bar with three menu items. There is definitely room on the CAB, but only one item shows and the other two are forced into the oveflow menu. If I use android:showAsAction="always" in all three menu items,nothing happens.…

Edijae Crusar
- 3,473
- 3
- 37
- 74