左晓为主开发手持机充值管理机
zuoxiao
2 天以前 b8ed2b19e0aaf3c357e2f601d8304acdc525f4f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?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>
        <variable
            name="cardInfo"
            type="com.dayu.general.bean.net.CardReplaceInfo" />
    </data>
 
    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="10dp"
        android:layout_marginVertical="6dp"
        app:cardCornerRadius="10dp"
        app:cardElevation="3dp"
        app:cardBackgroundColor="@color/white">
 
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="12dp">
 
            <!-- 顶部信息:卡号和状态 -->
            <TextView
                android:id="@+id/tv_card_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="卡号"
                android:textColor="@color/title_bar_text"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
 
            <TextView
                android:id="@+id/tv_card_number"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginEnd="16dp"
                android:text="@{cardInfo.cardNum}"
                android:textColor="@color/colorPrimary"
                android:textSize="16sp"
                android:textStyle="bold"
                app:layout_constraintStart_toEndOf="@+id/tv_card_label"
                app:layout_constraintTop_toTopOf="@+id/tv_card_label"
                app:layout_constraintEnd_toStartOf="@+id/tv_status"
                tools:text="123456789" />
 
            <TextView
                android:id="@+id/tv_status"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/shape_status_bg"
                android:paddingHorizontal="10dp"
                android:paddingVertical="3dp"
                android:text="@{cardInfo.stateName}"
                android:textColor="@color/white"
                android:textSize="12sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="已挂失" />
 
            <!-- 分隔线 -->
            <View
                android:id="@+id/divider"
                android:layout_width="match_parent"
                android:layout_height="0.5dp"
                android:layout_marginTop="12dp"
                android:background="@color/light_grey"
                app:layout_constraintTop_toBottomOf="@+id/tv_card_number" />
 
            <!-- 客户信息 -->
            <TextView
                android:id="@+id/tv_client_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:text="客户"
                android:textColor="@color/title_bar_text"
                android:textSize="14sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/divider" />
 
            <TextView
                android:id="@+id/tv_client_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:text="@{cardInfo.clientName}"
                android:textColor="@color/title_bar_text"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintStart_toEndOf="@+id/tv_client_label"
                app:layout_constraintTop_toTopOf="@+id/tv_client_label"
                tools:text="张三" />
 
            <!-- 卡类型信息(交换到客户编号的位置) -->
            <TextView
                android:id="@+id/tv_card_type_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="30dp"
                android:text="卡类型"
                android:textColor="@color/title_bar_text"
                android:textSize="14sp"
                app:layout_constraintStart_toEndOf="@+id/tv_client_name"
                app:layout_constraintTop_toTopOf="@+id/tv_client_name" />
 
            <TextView
                android:id="@+id/tv_card_type"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:text="@{cardInfo.cardType}"
                android:textColor="@color/title_bar_text"
                android:textSize="14sp"
                app:layout_constraintStart_toEndOf="@+id/tv_card_type_label"
                app:layout_constraintTop_toTopOf="@+id/tv_card_type_label"
                tools:text="普通卡" />
 
            <!-- 客户编号信息(交换到卡类型的位置) -->
            <TextView
                android:id="@+id/tv_client_number_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="编号"
                android:textColor="@color/title_bar_text"
                android:textSize="14sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_client_label" />
 
            <TextView
                android:id="@+id/tv_client_number"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:text="@{cardInfo.clientNum}"
                android:textColor="@color/title_bar_text"
                android:textSize="14sp"
                app:layout_constraintStart_toEndOf="@+id/tv_client_number_label"
                app:layout_constraintTop_toTopOf="@+id/tv_client_number_label"
                tools:text="C12345" />
 
            <!-- 余额信息(放大字体) -->
            <TextView
                android:id="@+id/tv_money_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:text="余额"
                android:textColor="@color/colorAccent"
                android:textSize="16sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_client_number_label"
                app:layout_constraintVertical_bias="1.0" />
 
            <TextView
                android:id="@+id/tv_money"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:text="@{cardInfo.money.concat(&quot; 元&quot;)}"
                android:textColor="@color/colorAccent"
                android:textSize="20sp"
                android:textStyle="bold"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintTop_toTopOf="@+id/tv_money_label"
                tools:text="100.00 元" />
 
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.cardview.widget.CardView>
</layout>