activity_password.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <layout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools">
  5. <data>
  6. <import type="android.view.View" />
  7. <import type="com.quansu.heifengwuliu.utils.MUiSwitch" />
  8. <variable
  9. name="vm"
  10. type="com.quansu.heifengwuliu.vmodel.PasswordVModel" />
  11. </data>
  12. <LinearLayout
  13. android:name="com.ysnows.login.activity.LoginActivity"
  14. android:layout_width="match_parent"
  15. android:layout_height="match_parent"
  16. android:background="@color/white"
  17. android:fitsSystemWindows="true"
  18. android:orientation="vertical"
  19. tools:context="com.quansu.heifengwuliu.activity.LoginActivity">
  20. <LinearLayout
  21. android:layout_width="match_parent"
  22. android:layout_height="match_parent"
  23. android:visibility="@{vm.type==1?View.VISIBLE:View.GONE}"
  24. android:orientation="vertical">
  25. <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
  26. android:layout_width="match_parent"
  27. android:layout_height="48dp"
  28. android:layout_marginStart="35dp"
  29. android:layout_marginEnd="35dp"
  30. android:layout_marginTop="25dp"
  31. android:gravity="center_vertical"
  32. android:paddingStart="@dimen/dp_8"
  33. android:paddingEnd="@dimen/dp_14"
  34. android:visibility="@{vm.isShow?View.VISIBLE :View.GONE}"
  35. app:qmui_backgroundColor="#F4F3F9"
  36. app:qmui_borderColor="#F4F3F9"
  37. app:qmui_borderWidth="@dimen/dp_1"
  38. app:rv_radius="25dp"
  39. >
  40. <ImageView
  41. android:layout_width="35dp"
  42. android:layout_height="35dp"
  43. android:padding="5dp"
  44. android:src="@drawable/ic_login_pwd" />
  45. <com.ysnows.base.widget.DelEditText
  46. android:id="@+id/edt_old_pwd"
  47. android:layout_width="match_parent"
  48. android:layout_height="match_parent"
  49. android:background="@null"
  50. android:hint="@string/please_input_old_pwd"
  51. android:inputType="textPassword"
  52. android:text="@={vm.oldpassWord}"
  53. android:textSize="@dimen/sp_15" />
  54. </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
  55. <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
  56. android:layout_width="match_parent"
  57. android:layout_height="48dp"
  58. android:layout_marginStart="35dp"
  59. android:layout_marginEnd="35dp"
  60. android:layout_marginTop="25dp"
  61. android:gravity="center_vertical"
  62. android:paddingStart="@dimen/dp_8"
  63. android:paddingEnd="@dimen/dp_14"
  64. app:qmui_backgroundColor="#F4F3F9"
  65. app:qmui_borderColor="#F4F3F9"
  66. app:qmui_borderWidth="@dimen/dp_1"
  67. app:rv_radius="25dp"
  68. >
  69. <ImageView
  70. android:layout_width="35dp"
  71. android:layout_height="35dp"
  72. android:padding="5dp"
  73. android:src="@drawable/ic_login_pwd" />
  74. <com.ysnows.base.widget.DelEditText
  75. android:id="@+id/edt_new_pwd"
  76. android:layout_width="match_parent"
  77. android:layout_height="match_parent"
  78. android:background="@null"
  79. android:hint="@string/please_input_new_pwd"
  80. android:inputType="textPassword"
  81. android:text="@={vm.passWord}"
  82. android:textSize="@dimen/sp_15" />
  83. </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
  84. <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
  85. android:layout_width="match_parent"
  86. android:layout_height="48dp"
  87. android:layout_marginStart="35dp"
  88. android:layout_marginEnd="35dp"
  89. android:layout_marginTop="25dp"
  90. android:gravity="center_vertical"
  91. android:paddingStart="@dimen/dp_8"
  92. android:paddingEnd="@dimen/dp_14"
  93. app:qmui_backgroundColor="#F4F3F9"
  94. app:qmui_borderColor="#F4F3F9"
  95. app:qmui_borderWidth="@dimen/dp_1"
  96. app:rv_radius="25dp"
  97. >
  98. <ImageView
  99. android:layout_width="35dp"
  100. android:layout_height="35dp"
  101. android:padding="5dp"
  102. android:src="@drawable/ic_login_pwd" />
  103. <com.ysnows.base.widget.DelEditText
  104. android:id="@+id/edt_new_pwd_to"
  105. android:layout_width="match_parent"
  106. android:layout_height="match_parent"
  107. android:background="@null"
  108. android:hint="@string/please_input_new_pwd_twice"
  109. android:inputType="textPassword"
  110. android:text="@={vm.passWordTo}"
  111. android:textSize="@dimen/sp_15" />
  112. </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
  113. <View
  114. android:layout_width="match_parent"
  115. android:layout_height="0dp"
  116. android:layout_weight="1">
  117. </View>
  118. <androidx.cardview.widget.CardView
  119. android:layout_width="match_parent"
  120. android:layout_height="45dp"
  121. android:layout_marginLeft="35dp"
  122. android:layout_marginTop="10dp"
  123. android:layout_marginRight="35dp"
  124. android:layout_marginBottom="@dimen/dp_40"
  125. android:background="@color/colorPrimary"
  126. app:cardBackgroundColor="@color/colorPrimary"
  127. app:cardCornerRadius="22.5dp"
  128. app:cardElevation="2dp"
  129. app:cardPreventCornerOverlap="true">
  130. <Button
  131. android:id="@+id/btn_submit"
  132. android:layout_width="match_parent"
  133. android:layout_height="match_parent"
  134. android:background="#E17E30"
  135. android:onClick="@{v->vm.toSubmit()}"
  136. android:text="@string/submit"
  137. android:textColor="@color/white"
  138. android:textSize="@dimen/sp_16" />
  139. </androidx.cardview.widget.CardView>
  140. </LinearLayout>
  141. <!-- 支付密码-->
  142. <LinearLayout
  143. android:layout_width="match_parent"
  144. android:orientation="vertical"
  145. android:visibility="@{vm.type==2?View.VISIBLE:View.GONE}"
  146. android:layout_height="wrap_content">
  147. <LinearLayout
  148. android:layout_width="match_parent"
  149. android:orientation="horizontal"
  150. android:layout_marginTop="25dp"
  151. android:gravity="center_vertical"
  152. android:layout_marginStart="35dp"
  153. android:layout_marginEnd="35dp"
  154. android:layout_height="wrap_content">
  155. <TextView
  156. android:layout_width="wrap_content"
  157. android:textSize="@dimen/sp_15"
  158. android:textColor="@color/text_title"
  159. android:text="原支付密码:"
  160. android:layout_height="wrap_content">
  161. </TextView>
  162. <com.quansu.heifengwuliu.view.PasswordView
  163. android:id="@+id/ppet_old_password"
  164. android:layout_width="match_parent"
  165. app:cipherEnable="true"
  166. app:passwordLength="6"
  167. app:smode="rect"
  168. android:layout_height="45dp">
  169. </com.quansu.heifengwuliu.view.PasswordView>
  170. </LinearLayout>
  171. <LinearLayout
  172. android:layout_width="match_parent"
  173. android:orientation="horizontal"
  174. android:layout_marginTop="25dp"
  175. android:gravity="center_vertical"
  176. android:layout_marginStart="35dp"
  177. android:layout_marginEnd="35dp"
  178. android:layout_height="wrap_content">
  179. <TextView
  180. android:layout_width="wrap_content"
  181. android:textSize="@dimen/sp_15"
  182. android:textColor="@color/text_title"
  183. android:text="新支付密码:"
  184. android:layout_height="wrap_content">
  185. </TextView>
  186. <com.quansu.heifengwuliu.view.PasswordView
  187. android:id="@+id/ppet_new_password"
  188. android:layout_width="match_parent"
  189. app:cipherEnable="true"
  190. app:passwordLength="6"
  191. app:smode="rect"
  192. android:layout_height="45dp">
  193. </com.quansu.heifengwuliu.view.PasswordView>
  194. </LinearLayout>
  195. <View
  196. android:layout_width="match_parent"
  197. android:layout_height="0dp"
  198. android:layout_weight="1">
  199. </View>
  200. <androidx.cardview.widget.CardView
  201. android:layout_width="match_parent"
  202. android:layout_height="45dp"
  203. android:layout_marginLeft="35dp"
  204. android:layout_marginTop="10dp"
  205. android:layout_marginRight="35dp"
  206. android:layout_marginBottom="@dimen/dp_40"
  207. android:background="@color/colorPrimary"
  208. app:cardBackgroundColor="@color/colorPrimary"
  209. app:cardCornerRadius="22.5dp"
  210. app:cardElevation="2dp"
  211. app:cardPreventCornerOverlap="true">
  212. <Button
  213. android:id="@+id/btn_pay_submit"
  214. android:layout_width="match_parent"
  215. android:layout_height="match_parent"
  216. android:background="#E17E30"
  217. android:text="@string/submit"
  218. android:textColor="@color/white"
  219. android:textSize="@dimen/sp_16" />
  220. </androidx.cardview.widget.CardView>
  221. </LinearLayout>
  222. </LinearLayout>
  223. </layout>