contextual-action-bar

Change the color of the line into the Contextual Action Bar

↘锁芯ラ 提交于 2020-01-15 05:26:11
问题 I would like to change the color of the line that appears onto the contextual action bar; to be more clear I will put an image: You see the Light blue line just above the white area? How could I change its color? Thanks 回答1: You should first create your own 9-patch image with the colours which you want to use. For example an image like this : And after that in your application's theme you should add this (for Holo Theme) : <style name="Theme.MyAppTheme" parent="@android:style/Theme.Holo.Light

Contextual Action Mode custom behavior

南笙酒味 提交于 2020-01-03 09:47:51
问题 In android developer's menu guide it is mentioned that: The action mode is disabled and the contextual action bar disappears when the user deselects all items, presses the BACK button, or selects the Done action on the left side of the bar. Technically, it means that mActionMode.finish() , the BACK button press, or the Done action selection call ActionMode.Callback onDestroyActionMode() method. My question is how to perform a custom action (for example Toast("Action mode exit by Done select")

How to change the overflow button when in CAB?

谁说我不能喝 提交于 2020-01-03 04:18:07
问题 I have 2 different backgrounds to the Action bar. One light and another dark. One for the default title and another for the CAB (when some of the elements are selected/activated). I would like to have 2 different overflow when in those different states. I tried the selector but couldn't find the state to represent when in CAB mode. Any idea how to provide different overflow buttons? On a more general note, where can I start exploring the Action Bar so I could find the answers myself instead

Activate CAB menu when OnClickEvent happens in Android

一个人想着一个人 提交于 2019-12-30 10:03:12
问题 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 have a requirement to activate the CAB menu when do press on a menu item in Action Bar. Once it is pressed, the CAB menu should read that 0 items are selected. After that it should allow me to select items from GridView on single clicks. How can I

Hiding contexual action bar while navigation drawer is open

久未见 提交于 2019-12-30 06:04:15
问题 The question is similar to this except for the fact that instead of using a View Pager (VP) I want to use a Navigation Drawer (ND). I have a list of elements that activates a Contextual Action Bar (CAB) when one/several items are selected through long press actions. When the ND is opened I want to hide temporarily the CAB and show the basic action bar, while when it is closed to show again the CAB with the selected items. The feature is specified in the ND official documentation "Hide

Where to handle CAB actions of a list item that are common with detail?

隐身守侯 提交于 2019-12-25 07:24:17
问题 lets say I have master/detail pattern using fragments, so as usual, the detail fragment would be inside new activity on a phone and on a tablet it would be inside the previous activity that list fragment is in also. Old stuff. I have some actions to perform on the detail, like share, it would be actionbar item. Old stuff. But now, I want to implement Contextual ActionBar, or a dialog, it doesnt really matter in my opinion, that would allow sharing right from the list. My question is, where

Disable contextual Action bar in android webview on text selection

霸气de小男生 提交于 2019-12-21 06:00:32
问题 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 bad(whole screen is shaking ) and also text selection is not retaining. @Override public void onSupportActionModeStarted(ActionMode mode) { super.onSupportActionModeStarted(mode); mode.finish(); } How can i disable the contextual actionbar ? Is there any

Contextual Actionbar styles

こ雲淡風輕ζ 提交于 2019-12-17 06:27:16
问题 I'm looking for style information on the Contextual Action bar (CAB). I just need to change the colour of the text in fact.. As you can see from the above, this is using the standard Theme.Holo.Light.DarkActionBar theme, so I just need to set the text colour to white! Can anyone point me in the right direction? 回答1: To change the color/etc of the text in a contextual action bar: public boolean onCreateActionMode(ActionMode mode, Menu menu) { //mode.setTitle("Contextual Action Bar"); (replace

Contextual Action Mode not filtering touches

北慕城南 提交于 2019-12-14 03:46:50
问题 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 widget (one of the declared benefits of Toolbar). I have the contextual action mode styled to overlay the toolbar, and it hides it entirely. However, when I touch where the (now obscured) custom widget was located, the touch passes through to it. I