2012-06-27 87 views
3

在安裝了Android 2.3.4的HTC Sensation XE上(也許在其他HTC設備上,不幸的是我只能在這一款上)在WebView的右邊框上出現一條奇怪的白線(下面的截圖)。我也測試了我的應用程序在模擬器上使用相同的參數和華碩TF101,,但一切正常在HTC上測試時在WebView上出現奇怪的白色邊框Sensation XE

Here is the problem

這種佈局非常複雜,張貼在這裏,所以我測試了這一個(並且有同樣的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;">)。

任何人都可以給我一個建議,問題可以在哪裏?謝謝。

+0

嗯,我遇到了類似的問題,我懷疑它是默認滾動的webView – iNan

+0

@iNan哇,我該如何隱藏它? –

+0

可能是這一個'webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);'你可以試試? – iNan

回答

4

嗯,我想你可以使用webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);隱藏奇怪的滾動條。希望能幫助到你。閱讀此處以獲取更多詳細信息Hiding the scroll bar in WebView

+1

沒有爲我工作 – drogon

+0

也不適合我! – iancrowther

+0

工程就像一個魅力!謝謝 –

0

我曾經遇到過這個問題,因爲SCROLLBARS_OUTSIDE_OVERLAY什麼也沒做,所以讓我發瘋了。它原來是一個盒子陰影!

相關問題