我试图让按钮和广告单元位于屏幕底部,按钮直接位于广告单元上方。但是按钮仍然在页面的中间。有任何想法吗?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/wallpaperview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/banner_adview"
android:layout_centerInParent="true"
android:orientation="horizontal"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_use"
android:onClick="onUse" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_share"
android:onClick="onShare" />
</LinearLayout>
<com.mobclix.android.sdk.MobclixMMABannerXLAdView
android:id="@+id/banner_adview"
android:layout_width="320dip"
android:layout_height="50dip"
android:layout_gravity="center"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>