布局如下:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/hui"
android:scrollbars="none">
<RelativeLayout
android:id="@+id/fff"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/white">
<Button
android:id="@+id/sctocheckout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="@dimen/View_margin_10"
android:background="@color/textRed"
android:padding="@dimen/View_margin_10"
android:singleLine="true"
android:text="@string/addtocart"
android:textColor="@color/white"
android:textSize="@dimen/Font_Size_18" />
</RelativeLayout>
<ListView
android:id="@+id/ShopFavoriteLv"
style="@style/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/fff"
android:background="@color/gray"
android:layout_alignParentTop="true"
android:choiceMode="none"
android:divider="@null"
android:dividerHeight="@dimen/View_margin_3"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:scrollbars="none"></ListView>
</RelativeLayout>
遇到的问题
添加button android:layout_alignParentBottom="true"
就只看到relatelayout了,看不到listview了