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

Open Custom dialog on text selection of webview

I have implement code of text selection in webview. It's working very fine without any issue. But I want to open custom dialog instead of default dialog. The which I have use its link is below How to override default text selection of android…
Anand Savjani
  • 2,484
  • 3
  • 26
  • 39
10
votes
4 answers

appcompat v21 throws java.lang.UnsupportedOperationException

After updating my project to use the appcompat library to version 21.0.0 I have a problem with a context menu created with a gridview multichoice modal event. The same code works nice with appcompat v20. This is the relevant part of the main…
9
votes
2 answers

How to start contextual action bar for text view programmatically with default opions copy and select all?

Is there any way to programmatically start contextual action bar associated with a text view, on a button click? It should contain default options of copy/select all as well. Basically, I want to show the selection handles in my text view and the…
9
votes
1 answer

How do Android's new Toolbar and the Contextual Action Bar work together?

I'm redesigning my current app roughly following Chris Bane's excellent intro here. One thing struck me, though: If I set the new v7-appcompat Toolbar as actionbar replacement via setSupportActionBar() and derive my theme from…
Thomas Keller
  • 5,933
  • 6
  • 48
  • 80
8
votes
3 answers

CAB overflow menu custom style

In my application I am showing a contextual action bar and because I don't have room for all the actions, some of them are accessed under the overflow menu button. Now I want to style the overflow menu and change its background. My theme inherits…
Sandra
  • 4,239
  • 10
  • 47
  • 80
8
votes
1 answer

Webview text selection not clearing

I have implemented an ActionMode.Callback for custom text selection functions within a WebView. The problem that I am having is that the selection and the action mode states do not match. When I long-press, everything starts out just fine. When I…
8
votes
1 answer

How to change the overflow icon of the contextual action bar without changing it for the standard action bar?

My app's theme looks like shown in the following screenshot: As the theme is based on Theme.Holo.Light which contains dark action bar texts and overflow icon, I adjusted the overflow icon using the following style: