开发者

Android adMob inside a webview - layout issue

开发者 https://www.devze.com 2023-03-16 13:57 出处:网络
I\'m currently trying to put an ad using adMob at the bottom of the webview, but so far the webview is taking over the whole screen. I essentially just want a little banner at the bottom and the webvi

I'm currently trying to put an ad using adMob at the bottom of the webview, but so far the webview is taking over the whole screen. I essentially just want a little banner at the bottom and the webview on top

here is what I have:

<LinearLayout 
android:id="@+id/linearLayout1" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
    <LinearLayout 
    android:layout_height="wrap_content" 
    android:id="@+id/footer" 
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_weight="1">
    <WebV开发者_JAVA技巧iew
    android:id="@+id/sdrwebview"
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_gravity="top"/>
    </LinearLayout>

</LinearLayout>

Any Ideas? Thanks


this should solve the problem

Android AdMob Position top of screen not working


Try

android:layout_height="0dp"
android:layout_weight="1"

instead of

android:layout_height="fill_parent"

on the Webview

0

精彩评论

暂无评论...
验证码 换一张
取 消