Not sure why but below is my layout to get ads at the bottom of my mapview
via positionview. It took a bit of fiddling to get it to work and I moved
the zoom buttons to the top.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android";
    android:id="@+id/map_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:id="@+id/home_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <com.gook.main.PositionView
            android:id="@+id/map"
            style="@style/mapView"
            android:layout_width="fill_parent"
            android:layout_height="match_parent"
            android:apiKey="@string/google_map_key"
            android:clickable="true"
            android:longClickable="true" >
        </com.gook.main.PositionView>

        <ZoomControls
            android:id="@+id/zoomControlz"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ad_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/home_layout"
        android:layout_alignParentBottom="true"
        android:gravity="bottom" >

        <com.google.ads.AdView
            xmlns:googleads="
http://schemas.android.com/apk/lib/com.google.ads";
            xmlns:ads="http://schemas.android.com/apk/res/com.gook.main.Gook
"
            android:id="@+id/ad"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            googleads:adSize="BANNER"
            googleads:adUnitId="@string/admob_id"
            android:gravity="bottom" />
    </LinearLayout>

</RelativeLayout>

Peter


On Sun, Mar 18, 2012 at 1:21 PM, CaRRtel Industres <
carrtelindustr...@gmail.com> wrote:

> what's wrong with the ads size? My current code still has the same error
>
> <LinearLayout android:layout_width="fill_parent"
>
>     android:id="@+id/ad_layout"
>
>     android:layout_height="wrap_content"
>
>     android:gravity="bottom"
>
>     android:layout_alightParentBottom="true" >
>
>
>     <com.google.ads.AdView xmlns:ads="
> http://schemas.android.com/apk/res/com.carrtelind.truecolors";
>
>         android:id="@+id/ad"
>
>         android:layout_width="fill_parent"
>
>         android:layout_height="wrap_content"
>
>         ads:adUnitId="a14dbba084368db"
>
>         android:gravity="bottom" />
>
> </LinearLayout>
>
> On Sunday, March 18, 2012 5:10:49 AM UTC-5, oldnew wrote:
>>
>> googleads:adSize
>>
>> 2012/3/18 CaRRtel Industres <carrtelindustr...@gmail.com>
>>
>>> Could someone please tell me why i get this error. "error: Error parsing
>>> XML: junk after document element" I am attempting to include ads at the
>>> bottom of my app and I can't figure out this problem.
>>>
>>> <LinearLayout
>>>
>>>     android:layout_width="fill_**parent"
>>>
>>>     android:id="@+id/ad_layout"
>>>
>>>     android:layout_height="wrap_**content"
>>>
>>>     android:gravity="bottom"
>>>
>>>     android:layout_**alightParentBottom="true" >
>>>
>>>
>>>     <com.google.ads.AdView
>>>
>>>         android:id="@+id/ad"
>>>
>>>         android:layout_width="fill_**parent"
>>>
>>>         android:layout_height="wrap_**content"
>>>
>>>         googleads:adSize="BANNER"
>>>
>>>         googleads:adUnitId="@string/**admob_id"
>>>
>>>         android:gravity="bottom" />
>>>
>>> </LinearLayout>
>>>
>>>
>>> Thanks in advance
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@**
>>> googlegroups.com <android-developers@googlegroups.com>
>>> To unsubscribe from this group, send email to
>>> android-developers+**unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to