3

On HTC Sensation XE with Android 2.3.4 (and maybe on other HTC devices, unfortunately I can only on this one) there a strange white line on right border of the WebView (screenshot below). I've also tested my app on emulator with same params and on Asus TF101, but everything was OK.

Here is the problem

This layout is pretty complex to post here, so I've tested it on this one (and there is same bug too):

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/background"
    android:orientation="vertical" >

    <!-- This WebView created dynamically -->
    <WebView
        android:id="@+id/webView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />

</LinearLayout>

And here is the page, that I'm testing on. As you can see, there is no padding and no margin (<body style="padding:0; margin:0;">).

Can anyone give me an advice where the problem can be? Thanks.

Dmitry Zaytsev
  • 23,650
  • 14
  • 92
  • 146

2 Answers2

4

Well i think you can use this webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); to hide strange scroll bar. Hope it helps. Read this for more details Hiding the scroll bar in WebView

Community
  • 1
  • 1
Raghav
  • 4,590
  • 1
  • 22
  • 32
0

I had this issue, was driving me crazy as SCROLLBARS_OUTSIDE_OVERLAY did nothing. It turned out to be a box-shadow!!!!

iancrowther
  • 5,143
  • 4
  • 25
  • 25