<
RelativeLayout
xmlns:
android
=
"http://schemas.android.com/apk/res/android"
android
:orientation=
"vertical"
android
:layout_width=
"match_parent"
android
:layout_height=
"match_parent">
<
TextView
android
:id=
"@+id/text_title"
android
:layout_width=
"match_parent"
android
:layout_height=
"wrap_content"
android
:gravity=
"center"
android
:padding=
"10dp"
android
:text=
"购物车" />
<
com.scwang.smartrefresh.layout.SmartRefreshLayout
android
:layout_below=
"@+id/text_title"
android
:layout_above=
"@+id/linear_bottom"
android
:id=
"@+id/smart_refresh"
android
:layout_width=
"match_parent"
android
:layout_height=
"match_parent">
<
ScrollView
android
:layout_width=
"match_parent"
android
:layout_height=
"match_parent"
android
:scrollbars=
"none">
<
LinearLayout
android
:layout_width=
"match_parent"
android
:layout_height=
"match_parent"
android
:orientation=
"vertical">
<!--二级列表登录的按钮-->
<
com.example.fangjingdong.view.activity.MyExpanableView
android
:id=
"@+id/my_expanable_view"
android
:layout_width=
"match_parent"
android
:layout_height=
"wrap_content"
android
:visibility=
"gone">
</
com.example.fangjingdong.view.activity.MyExpanableView>
<
ImageView
android
:id=
"@+id/empty_cart_image"
android
:visibility=
"gone"
android
:src=
"@drawable/empty_cart"
android
:scaleType=
"fitXY"
android
:layout_width=
"match_parent"
android
:layout_height=
"200dp" />
<
LinearLayout
android
:id=
"@+id/linear_login"
android
:layout_width=
"match_parent"
android
:layout_height=
"wrap_content"
android
:layout_margin=
"10dp"
android
:orientation=
"horizontal">
<
Button
android
:id=
"@+id/cart_login"
android
:layout_width=
"wrap_content"
android
:layout_height=
"wrap_content"
android
:padding=
"10dp"
android
:text=
"登录" />
<
TextView
android
:layout_width=
"wrap_content"
android
:layout_height=
"wrap_content"
android
:text=
"登录后用于同步电脑和手机的商品" />
</
LinearLayout>
<!--为你推荐-->
<
LinearLayout
android
:layout_width=
"match_parent"
android
:layout_height=
"wrap_content"
android
:layout_marginTop=
"20dp"
android
:orientation=
"vertical">
<
TextView
android
:layout_width=
"match_parent"
android
:layout_height=
"wrap_content"
android
:background=
"#F2F0F4"
android
:gravity=
"center"
android
:padding=
"10dp"
android
:text=
"为你推荐" />
<
android.support.v7.widget.RecyclerView
android
:id=
"@+id/tui_jian_recycler"
android
:layout_width=
"match_parent"
android
:layout_height=
"wrap_content"
android
:nestedScrollingEnabled=
"false">
</
android.support.v7.widget.RecyclerView>
</
LinearLayout>
</
LinearLayout>
</
ScrollView>
</
com.scwang.smartrefresh.layout.SmartRefreshLayout>
<
RelativeLayout
android
:layout_above=
"@+id/linear_bottom"
android
:layout_below=
"@+id/text_title"
android
:id=
"@+id/relative_progress"
android
:layout_width=
"match_parent"
android
:layout_height=
"match_parent"
android
:visibility=
"gone">
<
ProgressBar
android
:layout_width=
"wrap_content"
android
:layout_height=
"wrap_content"
android
:layout_centerInParent=
"true" />
</
RelativeLayout>
<
LinearLayout
android
:id=
"@+id/linear_bottom"
android
:layout_alignParentBottom=
"true"
android
:gravity=
"center_vertical"
android
:orientation=
"horizontal"
android
:layout_width=
"match_parent"
android
:layout_height=
"50dp">
<
CheckBox
android
:button=
"@null"
android
:background=
"@drawable/check_box_selector"
android
:layout_marginLeft=
"10dp"
android
:id=
"@+id/cart_check_all"
android
:layout_width=
"wrap_content"
android
:layout_height=
"wrap_content" />
<
TextView
android
:layout_marginLeft=
"5dp"
android
:text=
"全选"
android
:layout_width=
"wrap_content"
android
:layout_height=
"wrap_content" />
<
TextView
android
:textSize=
"20sp"
android
:layout_marginLeft=
"10dp"
android
:id=
"@+id/text_total"
android
:text=
"合计:¥0.00"
android
:layout_width=
"0dp"
android
:layout_weight=
"1"
android
:layout_height=
"wrap_content" />
<
TextView
android
:paddingLeft=
"15dp"
android
:paddingRight=
"15dp"
android
:paddingTop=
"10dp"
android
:paddingBottom=
"10dp"
android
:id=
"@+id/text_buy"
android
:gravity=
"center"
android
:background=
"#ff0000"
android
:textColor=
"#ffffff"
android
:text=
"去结算(0)"
android
:layout_width=
"wrap_content"
android
:layout_height=
"match_parent" />
</
LinearLayout></
RelativeLayout>
group_xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:padding="10dp" android:orientation="horizontal" android:gravity="center_vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> <CheckBox android:button="@null" android:background="@drawable/check_box_selector" android:id="@+id/group_check_box" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:layout_marginLeft="10dp" android:id="@+id/group_shop_name" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout>
child_xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:padding="10dp" android:layout_width="match_parent" android:layout_height="wrap_content"> <CheckBox android:button="@null" android:background="@drawable/check_box_selector" android:id="@+id/child_check_box" android:layout_centerVertical="true" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <ImageView android:layout_marginLeft="10dp" android:layout_toRightOf="@+id/child_check_box" android:id="@+id/child_image" android:layout_width="100dp" android:layout_height="100dp" /> <TextView android:maxLines="2" android:minLines="2" android:layout_marginRight="5dp" android:layout_toLeftOf="@+id/child_text_delete" android:layout_marginLeft="10dp" android:layout_toRightOf="@+id/child_image" android:id="@+id/child_title" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:layout_marginLeft="10dp" android:id="@+id/child_price" android:layout_marginBottom="5dp" android:layout_alignBottom="@+id/child_image" android:layout_toRightOf="@+id/child_image" android:textColor="#ff0000" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <LinearLayout android:layout_marginRight="5dp" android:layout_toLeftOf="@+id/child_text_delete" android:layout_alignBottom="@+id/child_image" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:padding="5dp" android:background="@drawable/cart_bian_kuang" android:id="@+id/child_text_jian" android:text="-" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:paddingTop="5dp" android:paddingBottom="5dp" android:paddingRight="8dp" android:paddingLeft="8dp" android:background="@drawable/cart_bian_kuang" android:id="@+id/child_text_num" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:padding="5dp" android:background="@drawable/cart_bian_kuang" android:id="@+id/child_text_add" android:text="+" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> <TextView android:gravity="center" android:background="#ff0000" android:textColor="#ffffff" android:id="@+id/child_text_delete" android:layout_alignParentRight="true" android:layout_alignTop="@+id/child_image" android:layout_alignBottom="@id/child_image" android:text="删除" android:layout_width="40dp" android:layout_height="wrap_content" /> </RelativeLayout>