<?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:binding="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:ignore="RtlHardcoded">

    <data>

        <variable
            name="viewModel"
            type="com.hongyegroup.cpt_ewallet.mvvm.EWalletWithdrawViewModel" />

        <variable
            name="click"
            type="com.hongyegroup.cpt_ewallet.ui.EWalletWithdrawActivity.ClickProxy" />

        <import type="android.text.TextUtils" />

    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:orientation="vertical">

        <com.guadou.lib_baselib.view.titlebar.EasyTitleBar
            android:id="@+id/easy_title_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:Easy_title="余额提现" />

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fillViewport="true"
            android:overScrollMode="never">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingBottom="@dimen/d_20dp">

                <com.guadou.lib_baselib.font_text_view.TextViewBold
                    android:id="@+id/tv_withdrawal"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_24dp"
                    android:layout_marginTop="@dimen/d_17dp"
                    android:text="选择提现金额（人民币）"
                    android:textColor="@color/black"
                    android:textSize="@dimen/d_15sp" />

                <EditText
                    android:id="@+id/et_withdrawal_value"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_24dp"
                    android:layout_marginTop="@dimen/d_17dp"
                    android:layout_marginRight="@dimen/d_24dp"
                    android:background="@drawable/shape_white_border"
                    android:hint="输入提现金额"
                    android:inputType="numberDecimal"
                    android:maxLength="10"
                    android:paddingLeft="@dimen/d_18dp"
                    android:paddingTop="@dimen/d_13dp"
                    android:paddingBottom="@dimen/d_13dp"
                    android:singleLine="true"
                    android:text="@={viewModel.mWithdrawMoney}"
                    android:textColor="@color/profile_red"
                    android:textCursorDrawable="@null"
                    android:textSize="@dimen/d_16sp"
                    binding:onTextChanged="@{click.onMoneyChanged}"
                    binding:setDecimalPoints="@{2}"
                    binding:typefaceMedium="@{true}" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/d_5dp"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                    <com.guadou.lib_baselib.font_text_view.TextViewRegular
                        android:id="@+id/balance"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_24dp"
                        android:text="余额:"
                        android:textColor="@color/gray_76"
                        android:textSize="@dimen/d_15sp" />

                    <com.guadou.lib_baselib.font_text_view.TextViewRegular
                        android:id="@+id/tv_all_value"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="@{@string/renmingbi + viewModel.mAllMoney}"
                        android:textColor="@color/gray_76"
                        android:textSize="@dimen/d_15sp"
                        tools:text="¥ 7890" />


                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        binding:clicks="@{click.selectCheckBox}">

                        <ImageView
                            android:id="@+id/iv_select"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:padding="5dp"
                            android:src="@{click.isSelectAll?@drawable/withdrawal_all:@drawable/withdrawal_noall}"
                            tools:src="@drawable/withdrawal_noall" />

                        <com.guadou.lib_baselib.font_text_view.TextViewRegular
                            android:id="@+id/all"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginRight="@dimen/d_24dp"
                            android:text="全部"
                            android:textColor="@color/gray_76"
                            android:textSize="@dimen/d_15sp" />


                    </LinearLayout>

                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/d_10dp"
                    android:layout_marginTop="@dimen/d_22dp"
                    android:background="@color/page_bg" />

                <com.guadou.lib_baselib.font_text_view.TextViewBold
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_24dp"
                    android:layout_marginTop="@dimen/d_19dp"
                    android:text="选择提现方式"
                    android:textColor="@color/black"
                    android:textSize="@dimen/d_15sp" />


                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/d_45dp"
                    android:layout_marginLeft="@dimen/d_24dp"
                    android:layout_marginTop="@dimen/d_12dp"
                    android:layout_marginRight="@dimen/d_24dp"
                    android:background="@color/page_bg"
                    android:gravity="center_vertical"
                    android:orientation="horizontal"
                    binding:clicks="@{click.chooseGrioMethod}">

                    <ImageView
                        android:id="@+id/giro"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_14dp"
                        android:layout_marginRight="@dimen/d_14dp"
                        android:src="@drawable/giro_method" />

                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:singleLine="true"
                        android:text="银行卡提现"
                        android:textColor="@color/app_blue"
                        android:textSize="@dimen/d_15sp" />

                    <ImageView
                        android:id="@+id/iv_giro_checked"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginRight="@dimen/d_15dp"
                        android:src="@drawable/pay_method_checked"
                        android:visibility="gone"
                        binding:isVisibleGone="@{click.withdrawMethod == 1}" />

                </LinearLayout>

                <com.guadou.lib_baselib.font_text_view.TextViewMedium
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/d_42dp"
                    android:layout_marginLeft="@dimen/d_24dp"
                    android:layout_marginTop="@dimen/d_20dp"
                    android:layout_marginRight="@dimen/d_24dp"
                    android:background="@{(click.withdrawMethod!=0 &amp;&amp; !TextUtils.isEmpty(viewModel.mWithdrawMoney))? @drawable/selector_app_blue_button_round2_bg : @drawable/shape_center_gray_3round}"
                    android:gravity="center"
                    android:text="提交"
                    android:textColor="@color/white_text_fe"
                    android:textSize="@dimen/d_16sp"
                    binding:clicks="@{click.submitWithdraw}"
                    binding:setEnable="@{click.withdrawMethod!=0 &amp;&amp; !TextUtils.isEmpty(viewModel.mWithdrawMoney)}"
                    tools:background="@drawable/shape_center_gray_3round" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_24dp"
                    android:layout_marginTop="@dimen/d_10dp"
                    android:layout_marginRight="@dimen/d_24dp"
                    android:background="@drawable/shape_white_border"
                    android:orientation="vertical"
                    android:paddingLeft="@dimen/d_15dp"
                    android:paddingTop="@dimen/d_12dp"
                    android:paddingRight="@dimen/d_15dp"
                    android:paddingBottom="@dimen/d_12dp">

                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="备注:"
                        android:textColor="@color/gray_82"
                        android:textSize="@dimen/d_13sp" />

                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/d_9dp"
                        android:text="- 中国所有银行均可选择转账方式。"
                        android:textColor="@color/gray_text"
                        android:textSize="@dimen/d_12sp" />

                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/d_9dp"
                        android:text="- 所有新的转帐申请将于下一个工作天内处理。"
                        android:textColor="@color/gray_text"
                        android:textSize="@dimen/d_12sp" />

                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/d_9dp"
                        android:text="- 一旦转账申请被处理，您的余额将被更新。"
                        android:textColor="@color/gray_text"
                        android:textSize="@dimen/d_12sp" />

                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/d_9dp"
                        android:text="- 您可以进入“交易历史”页面查看过去的交易。"
                        android:textColor="@color/gray_text"
                        android:textSize="@dimen/d_12sp" />


                </LinearLayout>

            </LinearLayout>

        </ScrollView>

    </LinearLayout>


</layout>
