2012-07-05 56 views
0

我已將LinearLayout設置爲admobWebView。 當admob出現在最上面時,WebView Y pos正確地重新定位到0 + adMobHeightandroid禁用webview反彈

然後,如果你觸摸並拖動WebView,你可以在垂直方向移動相同的admob高度! iOS上的這個屬性被稱爲bounces

如何關閉它?

如果不可能,熱點迫使WebView重新計算其大小,重新加載內容?謝謝

請注意,春聯是alreary禁用,

webviewB.setVerticalScrollBarEnabled(false); 
    webviewB.setHorizontalScrollBarEnabled(false); 

回答

0

如果你總是想顯示在屏幕的上方,那麼你可能要考慮使用RelativeLayout的。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 

    <com.admob.android.ads.AdView 
    android:id="@+id/ad" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    app:backgroundColor="#000000" 
    app:primaryTextColor="#FFFFFF" 
    app:secondaryTextColor="#CCCCCC" 
    android:layout_alignParentTop="true" 
/> 

<!-- WebView below that --> 

<!--WebView--> 

</RelativeLayout> 
+0

addMob只顯示使用linearLayout。如果您嘗試此配置,admob不會顯示 – Jaume