Skip to content Skip to sidebar Skip to footer

Align AdView (AdMob) To Bottom Of Screen With WebView On Android Layout

The default screen of my app shows a ListView. When the user selects an entry a new Activity is displayed with a Title (TextView), some information gained from xml (WebView). I wan

Solution 1:

Figured out a way to solve this, but is it the best way??

This is how I did it:

<LinearLayout android:id="@+id/linearlayout" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:neildeadman="http://schemas.android.com/apk/res/com.neildeadman.android" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" style="@style/Info">
    <LinearLayout android:id="@+id/info" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" style="@style/info">
        <TextView android:id="@+id/title" style="@style/title" />
        <WebView android:id="@+id/info" style="@style/info" />
    </LinearLayout>
</LinearLayout>

The "layout_weight" attributes allowed me to force the inner LinearLayout to fill the remaining gap left by the add, which then contained my layout from above!

Works lovely....


Post a Comment for "Align AdView (AdMob) To Bottom Of Screen With WebView On Android Layout"