2012/03/05

Android AdMob Ads bottom Into A Scrollable View


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <ScrollView android:id="@+id/scrollLayout"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:layout_above="@+id/adView">
        <LinearLayout android:layout_height="fill_parent"
            android:layout_width="fill_parent">
            <TextView android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:text="Place very long string here..."/>
        </LinearLayout>
    </ScrollView>
    <com.google.ads.AdView
        xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
        android:id="@id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        ads:adUnitId="INSERT_YOUR_AD_UNIT_ID_HERE"
        ads:adSize="BANNER"
        ads:testDevices="TEST_EMULATOR"
        ads:loadAdOnCreate="true"/>
</RelativeLayout>

http://googleadsdeveloper.blogspot.com/2011/12/incorporating-android-admob-ads-into.html

No comments:

Post a Comment