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
4
votes
0 answers

Prevent CAB from showing on EditText text selection

I'm trying to prevent the standard Contextual Action Bar from showing upon selecting text in an EditText, while keeping the text selection functionality. (Cause I want to use custom views to copy, cut and paste) I've browsed the web, and tried the…
Jakob Harteg
  • 9,587
  • 15
  • 56
  • 78
4
votes
1 answer

Selection Handles Not Appearing in WebView (Android 4.0-4.3)

I have created a custom ActionMode.Callback in order to display a custom contextual action bar for text selection in a WebView. It works beautifully in Android 4.4, but in 4.1-4.3, the selection handles are not appearing. I can still perform my…
4
votes
1 answer

How to override Contextual Action Bar when selecting text in a WebView in Android?

I've googled a lot, and find some tutorials and answers here in stackoverflow, but I am facing some difficults to resolve this issue. I have a Fragment with a WebView, and I want to show my custom Contextual Action Bar when the user selects some…
androidevil
  • 9,011
  • 14
  • 41
  • 79
4
votes
0 answers

Text Selection Contextual Actionbar disappearing on autoscroll

I'm witnessing some very weird behaviour I think might be related to this question. My basic layout is a ListView with 1 header that contains a selectable TextView. When the entire ListView (header+items) fits in less than the screen and I select…
rmanna
  • 1,133
  • 14
  • 14
4
votes
1 answer

Activate CAB menu when OnClickEvent happens in Android

Trying to activate CAB menu when clicking on MenuItem from ActionBar. Here is how I set the GridView for listening to Multi Choice. The multiModeChoiceListener is working fine when I long press on Any item in the GridView. It is working fine. Now I…
4
votes
1 answer

Contextual action bar forces overflow

I am building the menu items of my Actionbar programmatically, due to a bug in Android when having two Fragments each with their own menu. I am building the menu in onCreateActionMode of the MultiChoiceModeListener. If there are more than 4 menu…
Kris B
  • 3,436
  • 9
  • 64
  • 106
3
votes
2 answers

Disable contextual Action bar in android webview on text selection

How to disable contextual action bar in web view? I Want text selection feature to remain as it is , but i don't want the Contextual action bar to come, how can i disable it ? Using this code hides the contextual action bar but it is looking…
Manohar
  • 22,116
  • 9
  • 108
  • 144
3
votes
0 answers

Regarding Contextual Action Bar in webview?

I wanted to hide Contextual action bar in webview long press click. Is there any way to hide or disable it. I tried with below code: webView.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean…
Ganesh Katikar
  • 2,620
  • 1
  • 26
  • 28
3
votes
2 answers

Why is Contextual Action Bar getting different style when calling startSupportActionMode inside onCreate method?

I'm using appcompat-v7:22.2.0 Toolbar widget and trying to show the contextual action bar (cab). To show this theme problem I wrote 2 methods startSupportActionMode and startSupportActionModeDelay. The first call…
tato.rodrigo
  • 2,783
  • 21
  • 26
3
votes
2 answers

Toolbar can still be interacted with in Contextual ActionBar

The Contextual ActionBar doesn't integrate with the toolbar, like it did with the ActionBar. It will appear above the toolbar. This can be fixed by placing `true` inside styles.xml The problem is that…
3
votes
2 answers

Contextual Action Mode in Fragment Doesn't Show Up

I want to make an app like this I have followed Google's guide to enable batch contextual actions in an AbsListView. In my case, I implemented the AbsListView in a Fragment because I want users be able to change layout, I have several layouts for…
3
votes
1 answer

Change Context Action Bar checkmark/done drawable?

Is there a good way to change the Context Action Bar checkmark drawable without creating a custom view for the whole Action Bar?
loeschg
  • 29,961
  • 26
  • 97
  • 150
3
votes
2 answers

Dismiss Context Actionbar when viewpager changes

Right now I have an activity using a viewpager to display a several fragments. each of those fragments has implemented a Context Action Bar in the fragment. I am trying to make it where if the user scrolls or tabs between the fragments, the…
gsueagle2008
  • 4,583
  • 10
  • 36
  • 46
3
votes
3 answers

Invalidate Contextual Action Bar on When Switching Tabs

I'm looking for a way to make it so that when the user switches tabs the contextual action bar that I have becomes invalid. I have it set up so that the tabs are linked to Fragments and each one has a different contextual action bar. I'm thinking…
jbeverid
  • 291
  • 7
  • 23
3
votes
0 answers

Contextual ActionBar for ListView With checkbox

I'm working with ListActivity with checkbox, I want to initiate Contextual Action Bar from the listview whenever the list item is checked and show the number items that are selected. I have gone through the CAB from…
Amritha Dilip
  • 723
  • 1
  • 8
  • 16