android-actionmode

android webview: prevent text selection actionMode actionBar

你离开我真会死。 提交于 2020-01-12 18:43:39
问题 I want to preserve the text selection in a webView while preventing any contextual menu of the actioMode from being shown. Neither the new floating one nor the old actionBar, just the selection handles and of course the selection behaviour. Hooking to the actionModeCallback in startActionMode allows me to clear all items in the menu in the callback onCreateActionMode. This works fine on android 6, since an empty floating menu won't show at all, and the actionMode text selection behaviour is

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); //

Cannot open custom file extension

不想你离开。 提交于 2019-12-23 08:56:13
问题 I have a file format I wish to support, it's just a zip but I've renamed it .amg so my app can read it. On my samsung phone with gingerbread it works fine and it opens. On my motorola phone with kitkat all I get is can not open it. I've tried various solutions found here but none seem to work. Typically I copy the file into the download folder on the phone and click the file. The only thing that works on kitkat is if I open the file using Astro File Manager, but I can't force that app on

Couldn't resolve resource @style/Widget.Holo.Light.ActionMode.Inverse

可紊 提交于 2019-12-21 08:24:09
问题 I'm creating an Android app in Android Studio. When I open the layout editor, I see that gray "popup window" on top of the layout, which says that it Couldn't resolve resource @style/Widget.Holo.Light.ActionMode.Inverse. This happens when I change the "rendering version" to API 15 ( Android 4.0.3 ). It worked a minute ago, but when I switched back to the layout, I just got this error. Edit: I use the AppCompat library. The theme is defined like this <style name="AppTheme" parent="Base.Theme

Couldn't resolve resource @style/Widget.Holo.Light.ActionMode.Inverse

时光毁灭记忆、已成空白 提交于 2019-12-21 08:22:04
问题 I'm creating an Android app in Android Studio. When I open the layout editor, I see that gray "popup window" on top of the layout, which says that it Couldn't resolve resource @style/Widget.Holo.Light.ActionMode.Inverse. This happens when I change the "rendering version" to API 15 ( Android 4.0.3 ). It worked a minute ago, but when I switched back to the layout, I just got this error. Edit: I use the AppCompat library. The theme is defined like this <style name="AppTheme" parent="Base.Theme

appcompat-v7 v23.0.0 statusbar color black when in ActionMode

孤街醉人 提交于 2019-12-18 12:38:21
问题 UPDATE Same issue present in the latest Gmail app. I still don't understand why would Google make such unpleasant UI change. Obsessive in me goes crazy whenever I see it QUESTION I have this weird issue with appcompat-v7 23. Issue I am going to describe does not happen with 22 series You can get source code that reproduces this issuse form https://github.com/devserv/t/ Once built, you can tap and hold an item in the list to activate ActionMode Issue: When in ActionMode, appcompat turns status

How can I customize the Action Mode's color and text?

*爱你&永不变心* 提交于 2019-12-17 07:19:49
问题 The default action mode (3.0 and up) comes with a green theme and a 'Done' button on the left side. How can I customize these? Thanks 回答1: This is the style used for any ActionMode, I pulled it from the SDK. You'll need to create your own style to customize it. It's really easy to do. If you've never done anything like this before, you should read through this post on customizing the ActionBar. It explains everything you'll need to know. <style name="Widget.ActionMode"> <item name="android

How can I customize the Action Mode's color and text?

回眸只為那壹抹淺笑 提交于 2019-12-17 07:19:21
问题 The default action mode (3.0 and up) comes with a green theme and a 'Done' button on the left side. How can I customize these? Thanks 回答1: This is the style used for any ActionMode, I pulled it from the SDK. You'll need to create your own style to customize it. It's really easy to do. If you've never done anything like this before, you should read through this post on customizing the ActionBar. It explains everything you'll need to know. <style name="Widget.ActionMode"> <item name="android

Setting a custom share icon on Actionbar ShareActionProvider without ActionBarSherlock

一世执手 提交于 2019-12-12 10:55:18
问题 I have the same problem as was described here - Setting a custom share icon on Actionbar ShareActionProvider But I'am not using ActionBarSherlock I found that the Sherlock theme uses the " actionModeShareDrawable " and I can also use it like this, if I don't use ActionBarSherlock <style name="Theme.MyApp" parent="android:Theme.Holo"> <item name="*android:actionModeShareDrawable">@drawable/icon</item> </style> This works fine on my nexus 5, but failed on many other devices So my question is,

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 :