购物车的布局

来源:互联网 发布:"笨办法"学python 编辑:程序博客网 时间:2024/06/05 11:37
<RelativeLayout 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="com.dash.a18_shopping_cart.view.MainActivity">

    <ScrollView
        android:layout_above="@+id/linear_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <!--购物车的二级列表-->
            <com.dash.a18_shopping_cart.view.custom.CartExpanableListview
                android:id="@+id/expanable_listview"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

            </com.dash.a18_shopping_cart.view.custom.CartExpanableListview>

            <!--为你推荐-->
            <LinearLayout
                android:orientation="vertical"
                android:background="#00ff00"
                android:layout_width="match_parent"
                android:layout_height="500dp">

            </LinearLayout>



        </LinearLayout>


    </ScrollView>

    <LinearLayout
        android:id="@+id/linear_layout"
        android:layout_alignParentBottom="true"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="50dp">
        <CheckBox
            android:layout_marginLeft="10dp"
            android:button="@null"
            android:background="@drawable/check_box_selector"
            android:id="@+id/check_all"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

        <TextView
            android:id="@+id/text_total"
            android:text="合计:¥0.00"
            android:layout_weight="2"
            android:layout_width="0dp"
            android:layout_height="wrap_content" />

        <TextView
            android:text="去结算(0)"
            android:background="#ff0000"
            android:textColor="#ffffff"
            android:gravity="center"
            android:id="@+id/text_buy"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent" />

    </LinearLayout>

</RelativeLayout>
原创粉丝点击