0

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">
    <WebView
    android:id="@+id/sdrwebview"
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_gravity="top"/>
    </LinearLayout>

</LinearLayout>

Any Ideas? Thanks

Splitusa
  • 1,181
  • 7
  • 31
  • 51

2 Answers2

0

this should solve the problem

Android AdMob Position top of screen not working

Community
  • 1
  • 1
dcanh121
  • 4,665
  • 11
  • 37
  • 84
0

Try

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

instead of

android:layout_height="fill_parent"

on the Webview

mibollma
  • 14,959
  • 6
  • 52
  • 69