我應該做些什麼改變才能將相對佈局放在底部?我想將我的相對佈局放在底部
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="86dp"
android:layout_alignParentBottom="true"
android:layout_weight="0.08"
android:gravity="bottom" >
</RelativeLayout>
</LinearLayout>
刪除android:layout_weight =「0.08」,您沒有將權重指定給其父級佈局。並使父親RelativeLayout。 – Rahul
@rahulkapoor'weight_sum'在使用'weight'時不是必須的......只有在某些情況下 – codeMagic
其仍然沒有幫助。 –