actionmode

AppCompat Toolbar: Change Overflow Icon Color in ActionMode

自古美人都是妖i 提交于 2020-01-30 14:31:33
问题 With the AppCompat Toolbar, I want to be able to change the color of the overflow menu icon on ActionMode change. For example, the overflow icon will be white in normal Toolbar mode. And will turn black on ActionMode. So far, I have managed to change the background of the action mode as well as the title text. But I have yet to find a way to change the overflow menu icon color. I know that there's an answer available: Change ActionMode Overflow icon I tried the first solution and I wasn't

Modify android theme from appcompat theme

送分小仙女□ 提交于 2020-01-06 13:36:46
问题 Is there any way to change an attribute from the stock android themes, if the App is using the AppCompat theme? My Problem: I am using AppCompat theme in order to get the L-Look. But I need to use the ActionMode, which is from basic Android API. If I change the ActionMode style within my AppCompat theme, the style for the SupportedActionMode is applied. But i defintily need the basic API ActionMode. Does anybody know a way how to do this, in order to style my ActionMode background? 回答1: Use

Remove default home/up button in action mode

余生长醉 提交于 2019-12-24 08:22:12
问题 I have created custom action mode which visible on long click on list item . There is default back/up button visible in actionMode . Without change in style.xml , it's possible to remove default action mode back/up button from fragment/activity class. Kindly help. 回答1: Use the method: getActionBar().setDisplayHomeAsUpEnabled(false) to remove the home button from the action bar. Example: ActionBar actionBar = getActionBar(); if (actionBar != null) { actionBar.setHomeButtonEnabled(false); //

Detect ActionMode nesting

那年仲夏 提交于 2019-12-23 02:53:11
问题 I use some custom ActionModes in my application. When an action mode is closed, I do some housekeeping, like closing related views, updating changes, etc.. I detect the action mode has been closed in OnDestroyActionMode. My problem is, when inside of some of my ActionModes, the user may trigger another system actionmode (The text copy/paste/select). In that case, onDestroyActionMode is called and I erroneously asume the user is done with the first actionmode, rather than implement a "stack"

Detect ActionMode nesting

不羁的心 提交于 2019-12-23 02:53:07
问题 I use some custom ActionModes in my application. When an action mode is closed, I do some housekeeping, like closing related views, updating changes, etc.. I detect the action mode has been closed in OnDestroyActionMode. My problem is, when inside of some of my ActionModes, the user may trigger another system actionmode (The text copy/paste/select). In that case, onDestroyActionMode is called and I erroneously asume the user is done with the first actionmode, rather than implement a "stack"

remove back/home button from action mode on long press in android

我的梦境 提交于 2019-12-11 04:40:18
问题 I have implemented contextual action mode on long press inside recycler view . For that i have called ActionModeCallback from creating action mode . While creating action mode , back arrow is showing by default . Check below : On click back arrow , action mode will close. Now i want to hide or remove that default back button which is coming along with action mode in android . Note : Already tried getActionBar().setDisplayHomeAsUpEnabled(false). but it's not working . Kindly help. Edited :

AppCompat Toolbar: Change Overflow Icon Color in ActionMode

回眸只為那壹抹淺笑 提交于 2019-12-02 17:33:48
With the AppCompat Toolbar, I want to be able to change the color of the overflow menu icon on ActionMode change. For example, the overflow icon will be white in normal Toolbar mode. And will turn black on ActionMode. So far, I have managed to change the background of the action mode as well as the title text. But I have yet to find a way to change the overflow menu icon color. I know that there's an answer available: Change ActionMode Overflow icon I tried the first solution and I wasn't able to find the overflow icon. The second solution, even with a 50L delay causes the overflow menu icon

How to get the selected text of webview in ActionMode override

六眼飞鱼酱① 提交于 2019-11-27 22:37:44
I am adding some custom menu items in the Contextual Action Menu. I need to give a web search feature with the words selected in the WebView. I override the ActionMode using this code. @Override public void onActionModeStarted(ActionMode mode) { if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { if (mActionMode == null) { mActionMode = mode; Menu menu = mode.getMenu(); mode.getMenuInflater().inflate(R.menu.menu_search, menu); } } super.onActionModeStarted(mode); } public void onContextualMenuItemClicked(MenuItem item) { switch (item.getItemId()) { case R.id.menu_search: //HERE I WANT

How to change ActionMode background color in Android

江枫思渺然 提交于 2019-11-27 04:31:49
i am creating an android app in which support level api is 7 so i am using sherlock actionbar. I am using action mode in it. Issue is i want to change the background of action mode. So i have tried <item name="android:background">@color/something</item> <item name="android:backgroundStacked">@color/something</item> <item name="android:backgroundSplit">@color/something</item> these style solution's available but none of them works. http://i43.tinypic.com/2nriic1.png Shayan Pourvatan if you want change the color of ActionBar just do this: ActionBar bar = getActionBar(); bar.setBackgroundDrawable

How to get the selected text of webview in ActionMode override

喜夏-厌秋 提交于 2019-11-26 21:04:57
问题 I am adding some custom menu items in the Contextual Action Menu. I need to give a web search feature with the words selected in the WebView. I override the ActionMode using this code. @Override public void onActionModeStarted(ActionMode mode) { if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { if (mActionMode == null) { mActionMode = mode; Menu menu = mode.getMenu(); mode.getMenuInflater().inflate(R.menu.menu_search, menu); } } super.onActionModeStarted(mode); } public void