您的位置:首页 > 其它

登录注册到数据展示到购物车布局

2018-01-06 10:31 489 查看
activity_main

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical">

    <ImageView

        android:id="@+id/image_view01"

        android:layout_width="match_parent"

        android:layout_height="100dp"

        android:layout_margin="10dp"

        android:background="@drawable/taobaoview" />

    <EditText

        android:id="@+id/et_phone"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_margin="10dp"

        android:hint="请输入手机号" />

    <EditText

        android:inputType="numberPassword"

        android:id="@+id/et_pwd"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_margin="10dp"

        android:hint="请输入密码" />

    <Button

        android:id="@+id/btn_login"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_margin="10dp"

        android:background="#FF7802"

        android:text="登录" />

    <LinearLayout

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:orientation="horizontal">

        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_margin="10dp"

            android:text="忘记密码" />

        <TextView

            android:id="@+id/text_zhuce"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_margin="10dp"

            android:layout_marginLeft="200dp"

            android:padding="10dp"

            android:text="新用户注册" />

    </LinearLayout>

</LinearLayout>

activity_zhuce

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical">

    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:background="#FF7802"

        android:orientation="horizontal">

        <TextView

            android:id="@+id/text_tuichu"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:background="@drawable/grid_view02" />

        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_gravity="center"

            android:layout_marginLeft="160dp"

            android:text="新用户注册" />

    </LinearLayout>

    <EditText

        android:id="@+id/et_phone02"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_margin="10dp"

        android:hint="请输入手机号" />

    <EditText

        android:id="@+id/et_pwd02"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_margin="10dp"

        android:hint="请输入密码"

        android:inputType="numberPassword" />

    <Button

        android:id="@+id/btn_zhuce"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_margin="10dp"

        android:background="#FF7802"

        android:text="注册" />

</LinearLayout>

activity_shop

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical">

    <com.jcodecraeer.xrecyclerview.XRecyclerView

        android:id="@+id/xrecyclerview_01"

        android:layout_width="match_parent"

        android:layout_height="match_parent"></com.jcodecraeer.xrecyclerview.XRecyclerView>

</LinearLayout>

shop_layout_01

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="horizontal">

    <ImageView

        android:id="@+id/image_01"

        android:layout_width="150dp"

        android:layout_height="120dp"

        android:background="@mipmap/ic_launcher" />

    <LinearLayout

        android:layout_marginLeft="30dp"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:orientation="vertical">

        <TextView

            android:id="@+id/text_title"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_gravity="center_horizontal"

            android:layout_marginTop="20dp"

            android:text="555"

            android:textColor="#800080"

            android:textSize="20sp" />

        <TextView

            android:id="@+id/text_price"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_gravity="center_horizontal"

            android:layout_marginTop="20dp"

            android:text="555"

            android:textColor="#ff0000"

            android:textSize="20sp" />

    </LinearLayout>

</LinearLayout>

购物车页面

activity_add

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical">

    <com.example.wanggang001.view02.CustomVideoView

        android:id="@+id/videoView"

        android:layout_width="match_parent"

        android:layout_height="250dp" />

    <ImageView

        android:id="@+id/image_add_view"

        android:layout_width="match_parent"

        android:layout_height="250dp" />

    <TextView

        android:id="@+id/text_add_title"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_gravity="center_horizontal"

        android:layout_marginTop="20dp"

        android:text="555"

        android:textColor="#800080"

        android:textSize="20sp" />

    <TextView

        android:id="@+id/text_add_price"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_gravity="center_horizontal"

        android:layout_marginTop="20dp"

        android:text="555"

        android:textColor="#ff0000"

        android:textSize="20sp" />

    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:layout_marginTop="80dp"

        android:orientation="horizontal">

        <Button

            android:id="@+id/btn_add"

            android:layout_width="235dp"

            android:layout_height="wrap_content"

            android:background="#FF7802"

            android:text="加入购物车" />

        <Button

            android:id="@+id/btn_buy"

            android:layout_width="235dp"

            android:layout_height="wrap_content"

            android:layout_marginLeft="8dp"

            android:background="#FF7802"

            android:text="立即购买" />

    </LinearLayout>

</LinearLayout>

activity_cart_shop

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical">

    <android.support.v7.widget.RecyclerView

        android:id="@+id/recycler_View"

        android:layout_width="match_parent"

        android:layout_height="0dp"

        android:layout_weight="1" />

    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_alignParentBottom="true"

        android:gravity="center_vertical"

        android:orientation="horizontal"

        android:padding="10dp">

        <CheckBox

            android:id="@+id/quanxuan"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:background="@drawable/shopcart_unselected"

            android:button="@null" />

        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_marginLeft="10dp"

            android:text="全选"

            android:textSize="23sp"

            android:textStyle="bold" />

        <LinearLayout

            android:layout_width="0dp"

            android:layout_height="wrap_content"

            android:layout_marginLeft="10dp"

            android:layout_weight="1"

            android:orientation="vertical"

            android:padding="10dp">

            <TextView

                android:id="@+id/total_price"

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:text="总价 : ¥0元"

                android:textColor="#e53e42"

                android:textSize="20sp" />

            <TextView

                android:id="@+id/total_num"

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:text="共0件商品"

                android:textSize="20sp" />

            <TextView

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:layout_marginTop="5dp"

                android:text="不含运费"

                android:textSize="20sp" />

        </LinearLayout>

        <Button

            android:background="#FD7600"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="去支付"

            android:gravity="center"

            android:textColor="#fff"

            android:textSize="25sp" />

    </LinearLayout>

</LinearLayout>

custom_jiajian

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

  android:layout_width="match_parent"

    android:orientation="horizontal"

    android:gravity="center_vertical"

    android:layout_height="wrap_content">

    <Button

        android:background="#fff"

        android:textSize="20sp"

        android:id="@+id/reverse"

        android:text="一"

        android:layout_width="50dp"

        android:layout_height="wrap_content" />

    <EditText

        android:textStyle="bold"

        android:textSize="23sp"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:text="1"

        android:id="@+id/count"

        />

    <Button

        android:id="@+id/add"

        android:background="#fff"

        android:textSize="25sp"

        android:text="+"

        android:layout_width="50dp"

        android:layout_height="wrap_content" />

</LinearLayout>

recy_cart_item

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical">

    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:orientation="horizontal">

        <TextView

            android:layout_marginLeft="150dp"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_gravity="center"

            android:text="购物车"

            android:textColor="#ff0000"

            android:textSize="20sp" />

        <TextView

            android:layout_marginLeft="80dp"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="编辑"

            android:textSize="20sp" />

    </LinearLayout>

    <ImageView

        android:layout_width="match_parent"

        android:layout_height="5dp"

        android:background="#400040" />

    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:orientation="horizontal">

        <CheckBox

            android:id="@+id/shop_checkbox"

            android:layout_width="50dp"

            android:layout_height="50dp" />

        <TextView

            android:id="@+id/shop_name"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_marginLeft="20dp"

            android:text="5555"

            android:textSize="23sp"

            android:textStyle="bold" />

        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_gravity="center"

            android:layout_marginLeft="100dp"

            android:text="编辑"

            android:textSize="20sp" />

    </LinearLayout>

    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:gravity="center_vertical"

        android:orientation="horizontal">

        <CheckBox

            android:id="@+id/item_checkbox"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content" />

        <ImageView

            android:id="@+id/item_face"

            android:layout_width="120dp"

            android:layout_height="120dp"

            android:src="@mipmap/ic_launcher" />

        <LinearLayout

            android:layout_width="0dp"

            android:layout_height="wrap_content"

            android:layout_marginLeft="10dp"

            android:layout_weight="1"

            android:orientation="vertical">

            <TextView

                android:id="@+id/item_name"

                android:layout_width="wrap_content"

                android:layout_height="0dp"

                android:layout_weight="1"

                android:text="555"

                android:textSize="20sp" />

            <TextView

                android:id="@+id/item_price"

                android:layout_width="wrap_content"

                android:layout_height="0dp"

                android:layout_weight="1"

                android:text="555"

                android:textColor="#f00"

                android:textSize="23sp" />

            <com.example.wanggang001.view02.CustomJiaJian

                android:id="@+id/custom_jiajian"

                android:layout_width="wrap_content"

                android:layout_height="0dp"

                android:layout_weight="1" />

        </LinearLayout>

        <ImageView

            android:id="@+id/item_delete"

            android:layout_width="30dp"

            android:layout_height="30dp"

            android:layout_marginRight="10dp"

            android:src="@drawable/shopcart_delete" />

    </LinearLayout>

    <ImageView

        android:layout_width="match_parent"

        android:layout_height="5dp"

        android:background="#400040" />

</LinearLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  布局
相关文章推荐