此中只有布局哦
一。 首先是布局页面 activity.xml
购物车主体布局
<?xml version="1.0" encoding="utf-8"?>
<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"
tools:context=".TowActivity"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="45dp"
android:text="购物车"
android:textSize="22sp"
android:gravity="center"
android:background="#f00"
android:textColor="#fff"
/>
<ExpandableListView
android:id="@+id/list_cart"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</ExpandableListView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<CheckBox
android:id="@+id/checkall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:text="全选"/>
<TextView
android:id="@+id/goods_sum_price"
android:layout_width="wrap_content"
android:layout_height="