订单的布局

//activity_main
<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.mydingdan.MainActivity">

    <RelativeLayout
        android:background="#fff"
        android:layout_width="match_parent"
        android:layout_height="50dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textSize="20sp"
            android:text="订单列表"/>
        <ImageView
            android:id="@+id/image_btn"
            android:layout_width="25dp"
            android:layout_height="25dp"
            android:clickable="true"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="20dp"
            android:background="@drawable/lv_icon"/>
    </RelativeLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"

        android:orientation="horizontal">
        <TextView
            android:id="@+id/text_daizhi"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="match_parent"
            android:textSize="16sp"
            android:background="@drawable/biankuang"
            android:text="待支付"/>
        <TextView
            android:id="@+id/text_yizhi"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="match_parent"
            android:textSize="16sp"
            android:background="@drawable/biankuang"
            android:text="已支付"/>
        <TextView
            android:id="@+id/text_yiqu"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="match_parent"
            android:textSize="16sp"
            android:background="@drawable/biankuang"
            android:text="已取消"/>
    </LinearLayout>
    <FrameLayout
        android:id="@+id/frame_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"></FrameLayout>

</LinearLayout>
 
 
//frag_daizhi
 
 
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.scwang.smartrefresh.layout.SmartRefreshLayout
        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.support.v7.widget.RecyclerView
                android:id="@+id/recycler_daizhi"
                android:layout_width="match_parent"
                android:layout_height="match_parent"></android.support.v7.widget.RecyclerView>
        </ScrollView>
    </com.scwang.smartrefresh.layout.SmartRefreshLayout>
    <RelativeLayout
        android:id="@+id/relative_bar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true">
        <ProgressBar
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </RelativeLayout>

</RelativeLayout>
//item_dingdan适配器
 
 
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:orientation="horizontal">
        <TextView
            android:id="@+id/text_title"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:text="1111"/>
        <TextView
            android:id="@+id/text_daizhifu"
            android:layout_width="50dp"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:textColor="#ff0000"
            android:text="待支付"/>
    </LinearLayout>
    <TextView
        android:id="@+id/text_price"
        android:gravity="bottom"
        android:textColor="#ff0000"
        android:layout_marginLeft="20dp"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:text="1111"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:orientation="horizontal">
        <TextView
            android:id="@+id/text_tame"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:gravity="bottom"
            android:layout_height="match_parent"
            android:text="1111"/>
        <TextView
            android:id="@+id/text_btn"
            android:layout_width="70dp"
            android:gravity="center"
            android:layout_gravity="bottom"
            android:layout_height="30dp"
            android:background="@drawable/biankuang"
            android:text="取消订单"/>
    </LinearLayout>
    <TextView
        android:layout_marginTop="15dp"
        android:clickable="true"
        android:focusable="false"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="#9999"/>

</LinearLayout>
//PopupWindow布局
 
 
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="100dp"
        android:layout_height="wrap_content"

        android:orientation="vertical">
        <TextView
            android:id="@+id/btn_daizhi"
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="0dp"
            android:textSize="16sp"
            android:padding="15dp"
            android:background="@drawable/select_dianji"
            android:text="待支付"/>
        <TextView
            android:id="@+id/btn_yizhi"
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="0dp"
            android:textSize="16sp"
            android:padding="15dp"
            android:background="@drawable/select_dianji"
            android:text="已支付"/>
        <TextView
            android:id="@+id/btn_yiqu"
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:layout_height="0dp"
            android:textSize="16sp"
            android:padding="15dp"
            android:background="@drawable/select_dianji"
            android:text="已取消"/>
    </LinearLayout>
</RelativeLayout>

 
 
 
发布了21 篇原创文章 · 获赞 8 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/wei844067872/article/details/79059442