activity
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.bwie.guoyunfei.yuekao.MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="我的购物车" />
</RelativeLayout>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/big_recyc"
></android.support.v7.widget.RecyclerView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<CheckBox
android:id="@+id/check_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/check_box"
android:layout_toEndOf="@+id/check_box"
android:layout_toRightOf="@+id/check_box"
android:text="全选\全不选" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="总价:" />
<TextView
android:id="@+id/text_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/textView2"
android:layout_toRightOf="@+id/textView2"
android:text="xxxxx" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="去结算"
android:id="@+id/button_jisuan"
/>
</RelativeLayout>
</LinearLayout>
shangjia_layout
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/shangjia_checkbox"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="xxxxx"
android:id="@+id/shangjia_name"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:id="@+id/shangjia_recyc"
></android.support.v7.widget.RecyclerView>
</LinearLayout>
shangpin_layout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
>
<CheckBox
android:id="@+id/shangpin_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true" />
<ImageView
android:id="@+id/shangpin_image"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentTop="true"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_toEndOf="@+id/shangpin_checkbox"
android:layout_toRightOf="@+id/shangpin_checkbox"
android:src="@mipmap/ic_launcher" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/add_jian_qi"
android:layout_marginLeft="25dp"
android:layout_marginStart="25dp"
android:layout_toEndOf="@+id/shangpin_image"
android:layout_toRightOf="@+id/shangpin_image"
android:text="价格:" />
<TextView
android:id="@+id/shangpin_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView3"
android:layout_alignBottom="@+id/textView3"
android:layout_marginLeft="23dp"
android:layout_marginStart="23dp"
android:layout_toEndOf="@+id/textView3"
android:layout_toRightOf="@+id/textView3"
android:text="xxxx" />
<com.bwie.guoyunfei.yuekao.ui.AddJianQi
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:id="@+id/add_jian_qi"></com.bwie.guoyunfei.yuekao.ui.AddJianQi>
</RelativeLayout>