How to enable the default text highlights menu like: Copy/Paste/Search/Share in android webview ?
All that WebView does, by default, is show a web page.
WebView DevTools are a set of on-device tools to help debug your WebView apps. The best way to launch WebView DevTools is to download WebView Beta, Dev, or Canary. These channels contain a launcher icon which launches WebView DevTools.
Solution. After searching a lot, I found this thread. I did something similar: Just extend WebView and override onWindowVisibilityChanged . This way, the audio continues to play if the screen is locked or another app is opened.
Working on Android 1.5 - 2.3 you can use emulateShiftHeld()
made public since 2.2 but now is deprecated. this method put your WebView into text selection mode.
https://developer.android.com/reference/android/webkit/WebView.html#emulateShiftHeld%28%29
Unfortunately there's no copy/paste/search/share function integrated in Android, since Android 2.0 the text selection can be driven by touch but other than that, there's no other thing you can do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With