我试图放置带有横幅广告的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