如何在屏幕底部設置橫幅?
我試着用RelativeLayout,它保持底部,但在屏幕外。
橫幅底部Android
這是我簡單的代碼:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_home"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
android:orientation="vertical">
<LinearLayout
android:id="@+id/layout_body"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background2"
android:orientation="vertical">
......
</LinearLayout>
<RelativeLayout
android:id="@+id/layout_banner"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
....
</RelativeLayout>
</LinearLayout>
UPDATE
我已經設置的android:layout_alignParentBottom = 「真」,但不能更改
你是什麼意思的「外屏」? – Shrikant
我想,我們需要設置橫幅的高度和寬度,取決於設備的分辨率。 – 2012-09-20 07:03:48
@enfix請參閱我的答案,如果答案對您有幫助,請接受。 –