Questions tagged [contextual-action-bar]

The contextual action bar (CAB) is a temporary action bar that overlays the app's current action bar while data is selected. It appears after the user long-presses on a selectable data item.

The contextual action bar from the platform was introduced in API level 11(Honeycomb) to provide a new way to show contextual actions for selected content instead of the traditional context menu. Although it was introduced in the SDK starting with Honeycomb the contextual action bar is available to lower API versions thanks to various libraries(like the ActionBarSherlock library). The contextual action bar should be preferred to the old context menu because it offers a richer and better user experience. More information about the contextual action bar can be found in:

219 questions
0
votes
1 answer

remove back arrow in ContextualActionBar

My Application uses an Activity (extends AppCompatActivity) with a ListView. The title-row shows a title and a back-arrow. A ContextualActionBar is assigned to the ListView. When the ContextualActionBar gets active, because a long click to one item…
Uli F.
  • 9
  • 2
0
votes
1 answer

How not to finish "batch contextual actions" when all items deselected in Android Listview?

I use "batch contextual actions" in a ListView in my Android app as it is described in the Android guide for menus: http://developer.android.com/guide/topics/ui/menus.html This is how I enable the contextual…
0
votes
1 answer

Contextual Action Bar unable to delete selected item from SQLite

CAB unable to delete the data from cursor adapter public class History extends ListActivity{ private ReminderDB mDbHelper; List selections = new ArrayList(); int count = 0; public void onCreate(Bundle savedInstanceState) { …
0
votes
0 answers

Weird contextual ActionBar on opening

My CAB behaves strangely on opening, I can't explain... so here's a link to the APK, then you'll be able to see what I mean. Here's the sample code I used : http://www.technotalkative.com/contextual-action-bar-cab-android/ I've noticed that it does…
Drarig29
  • 1,902
  • 1
  • 19
  • 42
0
votes
2 answers

Holding keyboard on top, contextual menu hide when i mark text

I currently have the problem, when i mark the text, and the keyboard is hidden, the contextual menu is showing and going up, to make a "area" for the keyboard. It looks like this, you can see a bit from the contextual menu on the top below at status…
user4546546
0
votes
0 answers

What determines the color of contextual action bar title and divider

I'm asking this because, my cab's title and color were white and all of the sudden when I am almost at the end of my project they are black. And I didn't mess with cab since I've set it.
Munez NS
  • 1,011
  • 1
  • 12
  • 31
0
votes
0 answers

Toolbar problems with appcompat-v7:22.1.1

I use the new Toolbar with a Contextual Action Bar. When I used the appcompat-v7:22.0.0 library, everything works fine when selecting a list item. But after updating to 22.1.1 and refactoring my ActionBarActivity to the new AppCompatActivity, the…
0
votes
1 answer

Android contextual action bar with custom ListView not allowing multiple selection

I followed Android API guide implementing CAB and I have several problems: Multiple selection not exist Selected items (rows) not colored to indicate they are selected How to change: [A] color of the CAB [B] Show some text on the CAB The current…
0
votes
1 answer

GridView CAB not showing up on Long click

gridView = (ExpandableGridview)findViewById(R.id.grid); gridView.setChoiceMode(ExpandableGridview.CHOICE_MODE_MULTIPLE_MODAL); gridView.setMultiChoiceModeListener(new ExpandableGridview.MultiChoiceModeListener() { @Override …
0
votes
0 answers

Contextual Action Bar appears white(no background) on one device but ok on the others

I'm new to android, but this thing I don't think that is related to experience. When I long press an item in my list to show the CAB, it appears with white background. I can see the buttons on the bar only when long pressing them, otherwise…
Smarambas
  • 171
  • 2
  • 10
0
votes
1 answer

Contextual ActionBar not showing on ListView with EditTexts

My ListView contains an EditText as part of each row and CAB won't show up when I long press a row. It does show up if I: change the EditText to TextView or set focusable="false" in the EditText or set descendantFocusability="blocksDescendants" in…
Victor Basso
  • 5,556
  • 5
  • 42
  • 60
0
votes
1 answer

How to use ActionBarActivity in context of NavigatorActivity?

I'm attempting to adapt Google's sample app code for a Navigation Drawer activity to my own app, but the activity I want to replace the fragment portion with is an ActionBarActivity. I need to be able to work with a unique action bar in each…
0
votes
1 answer

ListView CAB not showing up on Long click

I am using a custom array adapter and layout for my view. Custom view's List items have different buttons in it which are working without any issues. However, I want to select each List Item and have CAB appear when long pressed. For some reason CAB…
programmerboy
  • 341
  • 5
  • 15
0
votes
2 answers

Contextual action bar set a button to invisible

I have implemented a custom contextual action bar with two buttons : one for deleting selected items from a listview and the other one for editing selected item . What I am trying to do is to make the editButton invisible when two or more items have…
Stefan Stefanov
  • 829
  • 7
  • 23
0
votes
1 answer

Android: modifying the background of a view from onItemLongClick

From a list view in a fragment contained in a TabHost, I have implemented a CAB as well as highlighting of the longPressed (selected) row. This works perfectly running >= api 14. However, I am supporting api > 8. In api 8 I am seeing strange…
JohnRock
  • 6,795
  • 15
  • 52
  • 61