在安裝了Android 2.3.4的HTC Sensation XE上(也許在其他HTC設備上,不幸的是我只能在這一款上)在WebView的右邊框上出現一條奇怪的白線(下面的截圖)。我也測試了我的應用程序在模擬器上使用相同的參數和華碩TF101,,但一切正常。在HTC上測試時在WebView上出現奇怪的白色邊框Sensation XE
這種佈局非常複雜,張貼在這裏,所以我測試了這一個(並且有同樣的bug太多):
<?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。如您所見,沒有填充和無邊距(<body style="padding:0; margin:0;">
)。
任何人都可以給我一個建議,問題可以在哪裏?謝謝。
嗯,我遇到了類似的問題,我懷疑它是默認滾動的webView – iNan
@iNan哇,我該如何隱藏它? –
可能是這一個'webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);'你可以試試? – iNan