<?xml version="1.0" encoding="utf-8"?>
<layout 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">

    <data>

        <import type="android.view.View" />

        <variable
            name="vm"
            type="com.quansu.heifengwuliu.vmodel.AddressVModel" />
        <variable
            name="item"
            type="com.quansu.heifengwuliu.model.AddressBean" />

    </data>

    <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
        android:id="@+id/rl_todo"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/dp_10"
        android:layout_marginEnd="@dimen/dp_10"
        android:layout_marginBottom="@dimen/dp_10"
        android:orientation="horizontal"
        android:paddingLeft="@dimen/dp_10"
        app:qmui_borderColor="#BBBBBB"
        android:gravity="center_vertical"
        app:qmui_borderWidth="@dimen/dp_1"
        app:qmui_radius="@dimen/dp_2">


        <ImageView
            android:id="@+id/iv_chose"
            android:layout_width="40dp"
            android:layout_height="wrap_content"
            android:padding="10dp"
            android:onClick="@{v->vm.onChose(item)}"
            android:src="@drawable/select_off"
          >

        </ImageView>


        <LinearLayout
            android:id="@+id/ll_context"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:onClick="@{v->vm.toDetails(item.addr_id)}"
            android:orientation="vertical">


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/tv_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@{item.name}"
                    android:layout_marginTop="@dimen/dp_10"
                    android:textColor="#343434"
                    android:textSize="@dimen/sp_16"
                    tools:text="@string/app_name" />

                <TextView
                    android:id="@+id/tv_mobile"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/dp_10"
                    android:text="@{item.mobile}"
                    android:layout_marginTop="@dimen/dp_10"
                    android:textColor="#343434"
                    android:textSize="@dimen/sp_16"
                    tools:text="18353075657" />


                <TextView
                    android:layout_width="wrap_content"
                    android:text="默认"
                    android:visibility="@{item.is_default==1? View.VISIBLE :View.GONE}"
                    android:paddingStart="@dimen/dp_10"
                    android:paddingEnd="@dimen/dp_10"
                    android:paddingBottom="@dimen/dp_2"
                    android:paddingTop="@dimen/dp_2"
                    android:background="#459AEA"
                    android:textColor="@color/white"
                    android:layout_height="wrap_content">

                </TextView>


            </LinearLayout>


            <TextView
                android:id="@+id/tv_address"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_10"
                android:layout_marginBottom="@dimen/dp_10"
                android:text="@{item.address}"
                android:textColor="#343434"
                android:layout_marginRight="@dimen/dp_10"
                android:textSize="@dimen/sp_16"
                tools:text="山东省临沂市河东区芝麻墩街道金华路XX号" />

        </LinearLayout>
    </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
</layout>
