我有LinearLayout保存在一個單獨的文件,並使用Include
。 問題是我想要這個佈局在屏幕的底部。在我使用RelativeLayout的第一個佈局中很好。但在第二個佈局我使用LinearLayout,它似乎android:layout_alignParentBottom="true"
不起作用。我怎樣才能解決這個問題 ?
這裏是我的代碼:
包括佈局:
`保持佈局在父佈局的底部
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id/lytButtons"
style="@style/Register.LayoutButtons"
android:layout_alignParentBottom="true"
android:layout_marginBottom="8dp">
.
.
.
.
</LinearLayout>`
在第一個佈局,我有RelativeLayout的,並在第二個我有LinearLayout中。我如何更改包含在RelativeLayout和LinearLayout底部的包含的部分?
'似乎android:layout_alignParentBottom =「true」does not work'。不,不是的**。它只適用於** RelativeLayout **父項。 – 2015-03-25 11:51:35
對於'LinearLayout',使用'android:layout_gravity =「bottom」' – Piyush 2015-03-25 11:52:04
正確和我的問題在這裏。我如何修復linearLayout? – 2015-03-25 11:53:31