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
5
votes
2 answers

Android expanded SearchView makes other ActionBar items disappear

I'm facing some problems with a SearchView in a Contextual Action Bar called by a Fragment. The major one is that when my SearchView is expanded, it makes disappear all other items in action bar (except the closing button) even if there's some…
5
votes
1 answer

Creating a popup options menu in a contextual action bar

I have an app with a NoActionBar theme. In my main activity I have an options menu that I created manually on the top of the screen (or by utilizing the built in device's options button). In this main activity, I have a fragment with a listView…
limlim
  • 3,115
  • 2
  • 34
  • 46
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() { //…
5
votes
2 answers

How do I create a "Search" field in a contextual action bar?

I have an activity with an ActionBar. One of the options is to search a document (not necessarily local). I want to use a contextual action bar (CAB) with the following items: edit field - place for user to enter text they want to search…
JustLearningAgain
  • 2,227
  • 4
  • 34
  • 50
5
votes
1 answer

Error in startActionMode, appcompat

I used SherlockActionBar in my application, but after I began to use appcompat. And get error "The method startActionMode(ActionMode.Callback) in the type Activity is not applicable for the arguments (PageFragment.ActionModeCallback)" in the raw …
5
votes
2 answers

Contextual Actionbar with DialogFragment

I've been trying to implement a contextual action bar along with a dialog fragment. Similar to the downloads widget in android. I've tried to set android:windowActionModeOverlay to be true in the theme. But it doesnt seem to work. Is there any…
user1979424
5
votes
2 answers

Hiding/showing the contextual action bar programmatically

My use case: I have an activity with a ViewPager as its only view element, set up with three Fragments for its three pages (using a FragmentPagerAdapter). One of these fragments is a ListFragment, while the other two regular Fragments containing…
4
votes
0 answers

Android 12 | ActionMode menu items are not showing icons but only title in Contextual Action Mode, type_floating

I am using Action mode type_floating in webview where am showing action mode on long click of webview. It is showing action mode menu items correctly but in Android 12, it is just showing titlte names instead of icon. This is my onActionModeStarted…
Kanika
  • 10,648
  • 18
  • 61
  • 81
4
votes
2 answers

RecyclerView duplicating items after deletion from contextual action mode

In this part of my app, I am trying to implement deleting of selected favorite items via contextual action mode/bar, the problem is when I select an item then delete, it's deleted from the database and selected list but it is still available in…
4
votes
1 answer

Contextual action bar not overlapping toolbar completely

I'm adding contextual action bar after long click of RecyclerView element. Problem is toolbar is still visible. Contextual action bar doesn't overlap completely. Tried searching for info, but no or very little info found. My toolbar: After adding…
Vygintas B
  • 1,624
  • 13
  • 31
4
votes
0 answers

Disabling Contextual Action Bar Crosswalk-Cordova

Contextual Action Bar (CAB) won't disable using Crosswalk as a plugin in Cordova. Tried everything, starting with the CSS, all the way through HTML & JavaScript, and even MainActivity.java & XWalkCordovaView.java. I must disable the Contextual…
Matías
  • 363
  • 1
  • 10
4
votes
2 answers

Contextual Action Mode AppCompatActivity not show

I have my activity extending AppCompatActivity, and I wish to set a contextual action bar on it. So here is my onCreate method Toolbar toolbar = (Toolbar)…
aiqency
  • 1,015
  • 1
  • 8
  • 22
4
votes
0 answers

Contextual Action Mode not filtering touches

The contextual action mode, when overlayed on top of an android.support.v7.widget.Toolbar, does not appear to filter touches over its entire width, but lets touches "fall through" to (invisible) widgets on the Toolbar. My Toolbar contains a custom…
4
votes
1 answer

How do I disable sliding tabs when in contextual action bar, by making the tabs not clickable/swipeable?

I have a toolbar, to which I have attached a sliding tab layout, using these two classes: SlidingTabLayout, SlidingTabStrip. When I long press an item, the contextual action bar appears and overlays the toolbar, using
HaloMediaz
  • 1,251
  • 2
  • 13
  • 31
4
votes
0 answers

Android TextView actionbar works inconsistently

I have an app about studying sacred Indian texts usually consisting of a verse and a commentary to this verse. To open it up I use DisplayText activity which has an ActionBar popping up when user selects some text from either a verse or its…
Ivan
  • 6,388
  • 3
  • 24
  • 30
1 2
3
14 15