2013-12-20 25 views
0

我想在我的android應用中添加橫幅廣告。 但從webview加載的橫幅顯示空間或邊距。我沒有在任何地方指定保證金。從webview添加的圖像添加了邊距(空間),但純圖像不會在佈局中添加任何邊距

指定圖像的廣告空間300 x 50表示比這更大的任何焦點。

如果此空間顯示在web視圖中,圖像將部分顯示或從底部和側面裁剪。

這是直接添加的圖像。

enter image description here

這是圖片從網頁視圖加入。

enter image description here

任何溶液,以避免這些邊緣,因爲我不能定製的廣告空間的固定300×50固定大小。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context=".MainActivity" > 
    <WebView 
     android:id="@+id/webview1" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:background="@drawable/bann" /> 

</RelativeLayout> 

廣告空間是300 x 50.我不能在佈局中說明它。它由adserver SDK添加。

+0

能否請您發表您的佈局?謝謝。 – fasteque

+0

@fasteque添加了佈局。 –

+0

你檢查了嗎? http://stackoverflow.com/questions/8694184/remove-unwanted-white-space-in-webview-android – fasteque

回答