我試圖放置帶有橫幅廣告的LinearLayout
- 位於RelativeLayout
的底部。無法格式化我的佈局
我試圖去實現它:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".AllJokes" >
<ListView
android:id="@+id/allJokesList"
android:layout_height="wrap_content"
android:layout_width="match_parent">
</ListView>
<LinearLayout
android:layout_alignParentBottom="true"
android:id="@+id/adViewContainer"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.gms.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="MY_AD_UNIT_ID"
ads:adSize="BANNER"/>
</LinearLayout>
</RelativeLayout>
但它總是給我這個錯誤:
error: Error parsing XML: unbound prefix
我知道我的格式是完全搞砸了,但我不能找到一種方法使其有效。
我只是需要一個線索,因爲我是一個在android和xml的初學者。我錯過了我知道的很小的東西。
謝謝你的幫助!:) – chility
不客氣 – Raghunandan