リストビューの後にAndroidレイアウトが表示されない場合リストビューのアイテムが多い場合は4〜5個の項目を追加します。 'android:layout_alignParentBottom = "true"'を使用すると、線形レイアウトは最後のリストビューアイテムになります。ListViewの項目が多い場合、Android LinearLayoutが表示されない
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/sereen_2_bg" >
<ListView
android:id="@+id/cartList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:footerDividersEnabled="false"
>
</ListView>
<LinearLayout
android:id="@+id/linearCartFooter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:gravity="right"
android:orientation="vertical"
android:layout_below="@id/cartList"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/total"
android:textColor="@color/white" />
<TextView
android:id="@+id/txtCartTotal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:background="@color/white"
android:padding="3dp"
android:text="@string/total"
android:textColor="@color/black" />
</LinearLayout>
<Button
android:id="@+id/btnCartCheckout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/sereen4_submit" />
</LinearLayout>
</RelativeLayout>
私はこれをしましたが、私のボタンは画面外です。そして私はそれらを見ることができません –
alignParentBottom = "true"を下のLayoutに追加しましたか? – Demonick
はい私はこの問題を解決するために、alignParentBottom = "true"をbuttomレイアウトに追加し、リストマージンにボトムマージンを適用しました:) –