-1

I`m trying to make a app with webview in Android and IoS. and i have a question, when i clicked any area in Android webview, this orange line appear in only Android. Furthermore It doesn't appear in IoS even I use same webview and same contents. What is this line? I guess it is just android webview's attributes, but I'm not sure.

this is the screenshot when I clicked that area. It is a little bit secure thing, please understand remove contents.

enter image description here

it`s my source : layout.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root"
android:orientation="vertical"
android:weightSum="10"
style="@style/rootlinear" >

<WebView
    android:id="@+id/webView"
    style="@drawable/border"
    android:layout_width="match_parent"
    android:layout_weight="9.5"
    android:layout_height="0dp" />

and webview Setting

private void setWebviewInit(WebView webview) {
    webview.setInitialScale(1);
    webview.getSettings().setJavaScriptEnabled(true);
    webview.getSettings().setUseWideViewPort(true);
    webview.getSettings().setLoadWithOverviewMode(true);
    
    webview.getSettings().setSupportZoom(true);
    webview.getSettings().setBuiltInZoomControls(true);
    webview.getSettings().setDisplayZoomControls(false);
    
    webview.setWebViewClient(webviewclient);
    webview.setWebChromeClient(new WebviewAlert());
    webview.setWebChromeClient(new ChromeClient(this));
    webview.addJavascriptInterface(new JIFace(), "ezandroid");
}
Ryan M
  • 18,333
  • 31
  • 67
  • 74
Adrian
  • 301
  • 4
  • 15
  • Is the webview in match_parent and it's parent also ? with no padding nor margin ? – An-droid Jul 19 '16 at 11:56
  • Please, read [this (how to ask)](http://stackoverflow.com/help/how-to-ask) and [this (mcve)](http://stackoverflow.com/help/mcve) before asking, as those will help you get more and better answers from the community. We need at least your layout.xml file used to inflate that Activity. – Bonatti Jul 19 '16 at 12:07
  • Omg Thanks guys!!! I edited @SohailZahid and An-droid, Bonatti too. – Adrian Jul 19 '16 at 12:17
  • `style="@drawable/border"` what is boeder? – Sohail Zahid Jul 19 '16 at 12:34
  • It isn`t. maybe I need to search before asking a question. There are quite many same state like : http://stackoverflow.com/questions/18601824/disable-orange-highlight-on-a-div-in-webview even if I doesn't work yet, It will be possible. Thanks. – Adrian Jul 19 '16 at 12:38
  • Please don't make more work for others by vandalizing your posts. By posting on the Stack Exchange (SE) network, you've granted a non-revocable right, under the [CC BY-SA license](https://creativecommons.org/licenses/by-sa/4.0), for SE to distribute the content (regardless of your future choices). By SE policy, the non-vandalized version is distributed. Thus, any such destructive edits will be reverted. Please see [How does deleting work?](/help/what-to-do-instead-of-deleting-question) for more information on how deleting content works on this site. – Ryan M Feb 25 '22 at 06:58
  • Does this answer your question? [Disable orange highlight on a div in WebView](https://stackoverflow.com/questions/18601824/disable-orange-highlight-on-a-div-in-webview) – Ryan M Feb 25 '22 at 22:43

1 Answers1

1

Solved.

Add this one line in your css. It is working fine. Thanks.

* { -webkit-tap-highlight-color: rgba(0,0,0, 0.0); outline: none; }  
Adrian
  • 301
  • 4
  • 15