activity_facial_card.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout 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. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:background="@mipmap/icon_bgm"
  8. tools:context=".ui.login.FacialCardActivity">
  9. <RelativeLayout
  10. android:id="@+id/rel1"
  11. android:layout_width="match_parent"
  12. android:layout_height="45dp"
  13. android:layout_marginTop="10dp">
  14. <ImageView
  15. android:id="@+id/image"
  16. android:layout_width="30dp"
  17. android:layout_height="30dp"
  18. android:layout_centerVertical="true"
  19. android:layout_marginLeft="20dp" />
  20. <TextView
  21. android:id="@+id/deptName"
  22. android:layout_width="wrap_content"
  23. android:layout_height="wrap_content"
  24. android:layout_centerVertical="true"
  25. android:layout_marginLeft="10dp"
  26. android:layout_toRightOf="@+id/image"
  27. android:textColor="@color/white"
  28. android:textSize="22sp" />
  29. <RelativeLayout
  30. android:layout_width="wrap_content"
  31. android:layout_height="wrap_content"
  32. android:layout_centerInParent="true"
  33. android:layout_centerVertical="true"
  34. android:layout_marginTop="2dp">
  35. <TextView
  36. android:id="@+id/tvTitle"
  37. android:layout_width="wrap_content"
  38. android:layout_height="wrap_content"
  39. android:layout_centerHorizontal="true"
  40. android:layout_centerVertical="true"
  41. android:text="化学品智能管理"
  42. android:textColor="@color/white"
  43. android:textSize="24sp"
  44. android:textStyle="bold" />
  45. <TextView
  46. android:id="@+id/nowTime"
  47. android:layout_width="wrap_content"
  48. android:layout_height="wrap_content"
  49. android:layout_marginLeft="15dp"
  50. android:layout_marginTop="10dp"
  51. android:layout_toRightOf="@+id/tvTitle"
  52. android:maxLines="1"
  53. android:textColor="@color/white" />
  54. </RelativeLayout>
  55. </RelativeLayout>
  56. <LinearLayout
  57. android:layout_width="match_parent"
  58. android:layout_height="match_parent"
  59. android:layout_below="@+id/rel1"
  60. android:layout_marginLeft="31dp"
  61. android:layout_marginTop="30dp"
  62. android:layout_marginRight="31dp"
  63. android:layout_marginBottom="89dp"
  64. android:background="@drawable/bg_bei_jing"
  65. android:orientation="vertical">
  66. <TextView
  67. android:id="@+id/tvOen"
  68. android:layout_width="wrap_content"
  69. android:layout_height="wrap_content"
  70. android:layout_gravity="center"
  71. android:layout_marginTop="18dp"
  72. android:text="身 份 认 证"
  73. android:textColor="@color/white"
  74. android:textSize="17sp" />
  75. <LinearLayout
  76. android:layout_width="match_parent"
  77. android:layout_height="match_parent"
  78. android:layout_below="@+id/tvOen"
  79. android:layout_marginLeft="18dp"
  80. android:layout_marginTop="16dp"
  81. android:layout_marginRight="18dp"
  82. android:layout_marginBottom="15dp"
  83. android:orientation="horizontal">
  84. <RelativeLayout
  85. android:layout_width="428dp"
  86. android:layout_height="match_parent"
  87. android:layout_marginRight="10dp"
  88. android:layout_weight="1"
  89. android:orientation="vertical">
  90. <LinearLayout
  91. android:layout_width="wrap_content"
  92. android:layout_height="wrap_content"
  93. android:orientation="vertical">
  94. <RelativeLayout
  95. android:layout_width="match_parent"
  96. android:layout_height="34dp"
  97. android:background="@drawable/bg_ren_lian">
  98. <ImageView
  99. android:id="@+id/imgB"
  100. android:layout_width="30dp"
  101. android:layout_height="30dp"
  102. android:layout_centerVertical="true"
  103. android:layout_marginLeft="10dp"
  104. android:background="@mipmap/icon_smrz_sfrz" />
  105. <TextView
  106. android:layout_width="wrap_content"
  107. android:layout_height="wrap_content"
  108. android:layout_centerVertical="true"
  109. android:layout_marginLeft="10dp"
  110. android:layout_toRightOf="@+id/imgB"
  111. android:text="校 园 卡 验 证"
  112. android:textColor="@color/white"
  113. android:textSize="15sp" />
  114. </RelativeLayout>
  115. <RelativeLayout
  116. android:layout_width="match_parent"
  117. android:layout_height="252dp"
  118. android:background="@drawable/bg_face_nt">
  119. <ImageView
  120. android:layout_width="wrap_content"
  121. android:layout_height="200dp"
  122. android:layout_centerInParent="true"
  123. android:layout_centerVertical="true"
  124. android:layout_marginLeft="35dp"
  125. android:layout_marginTop="10dp"
  126. android:background="@mipmap/img_sfrz_sksyt" />
  127. </RelativeLayout>
  128. <RelativeLayout
  129. android:id="@+id/radio"
  130. android:layout_width="match_parent"
  131. android:layout_height="50dp"
  132. android:layout_marginTop="15dp"
  133. android:background="@mipmap/icon_rlrz_xx">
  134. <ImageView
  135. android:id="@+id/imgLetA"
  136. android:layout_width="wrap_content"
  137. android:layout_height="wrap_content"
  138. android:layout_centerVertical="true"
  139. android:layout_marginLeft="6dp"
  140. android:background="@mipmap/icon_sfsb_tx" />
  141. <LinearLayout
  142. android:layout_width="match_parent"
  143. android:layout_height="wrap_content"
  144. android:layout_centerVertical="true"
  145. android:layout_marginLeft="10dp"
  146. android:layout_toRightOf="@+id/imgLetA"
  147. android:orientation="vertical">
  148. <TextView
  149. android:layout_width="wrap_content"
  150. android:layout_height="wrap_content"
  151. android:text="请在刷卡区域进行刷卡验证"
  152. android:textColor="@color/black" />
  153. </LinearLayout>
  154. </RelativeLayout>
  155. <RelativeLayout
  156. android:id="@+id/rlResult"
  157. android:layout_width="match_parent"
  158. android:layout_height="50dp"
  159. android:layout_marginTop="15dp"
  160. android:background="@mipmap/icon_rlrz_xx"
  161. android:gravity="center"
  162. android:visibility="gone">
  163. <ImageView
  164. android:id="@+id/imgf"
  165. android:layout_width="18dp"
  166. android:layout_height="18dp"
  167. android:layout_centerVertical="true"
  168. android:layout_marginLeft="6dp"
  169. android:background="@mipmap/icon_sy_zq" />
  170. <TextView
  171. android:layout_width="wrap_content"
  172. android:layout_height="wrap_content"
  173. android:layout_centerVertical="true"
  174. android:layout_marginLeft="14dp"
  175. android:layout_toRightOf="@+id/imgf"
  176. android:text="验证通过"
  177. android:textColor="@color/purple_FF16BC3D"
  178. android:textSize="12sp" />
  179. </RelativeLayout>
  180. </LinearLayout>
  181. </RelativeLayout>
  182. <LinearLayout
  183. android:layout_width="428dp"
  184. android:layout_height="wrap_content"
  185. android:layout_below="@+id/rel1"
  186. android:layout_centerInParent="true"
  187. android:layout_marginLeft="10dp"
  188. android:layout_weight="1"
  189. android:orientation="vertical">
  190. <RelativeLayout
  191. android:layout_width="match_parent"
  192. android:layout_height="45dp"
  193. android:background="@drawable/bg_ren_lian">
  194. <ImageView
  195. android:id="@+id/imgA"
  196. android:layout_width="30dp"
  197. android:layout_height="30dp"
  198. android:layout_centerVertical="true"
  199. android:layout_marginLeft="10dp"
  200. android:background="@mipmap/icon_smrz_sfrz" />
  201. <TextView
  202. android:layout_width="wrap_content"
  203. android:layout_height="wrap_content"
  204. android:layout_centerVertical="true"
  205. android:layout_marginLeft="10dp"
  206. android:layout_toRightOf="@+id/imgA"
  207. android:text="人 脸 识 别 验 证"
  208. android:textColor="@color/white"
  209. android:textSize="15sp" />
  210. </RelativeLayout>
  211. <RelativeLayout
  212. android:layout_width="match_parent"
  213. android:layout_height="240dp"
  214. android:background="@drawable/bg_face_nt">
  215. <io.fotoapparat.facedetector.view.CameraOverlayLayout
  216. android:layout_width="match_parent"
  217. android:layout_height="match_parent">
  218. <io.fotoapparat.view.CameraView
  219. android:id="@+id/camera_view"
  220. android:layout_width="match_parent"
  221. android:layout_height="match_parent" />
  222. <io.fotoapparat.facedetector.view.RectanglesView
  223. android:id="@+id/rectanglesView"
  224. android:layout_width="match_parent"
  225. android:layout_height="match_parent"
  226. app:rectanglesColor="#FF4081"
  227. app:rectanglesStrokeWidth="2dp" />
  228. </io.fotoapparat.facedetector.view.CameraOverlayLayout>
  229. <ImageView
  230. android:id="@+id/imgFace"
  231. android:layout_width="match_parent"
  232. android:layout_height="wrap_content"
  233. android:background="@mipmap/icon_face_two" />
  234. </RelativeLayout>
  235. <RelativeLayout
  236. android:layout_width="match_parent"
  237. android:layout_height="50dp"
  238. android:layout_marginTop="15dp"
  239. android:background="@mipmap/icon_rlrz_xx">
  240. <ImageView
  241. android:id="@+id/imgLetB"
  242. android:layout_width="wrap_content"
  243. android:layout_height="wrap_content"
  244. android:layout_centerVertical="true"
  245. android:layout_marginLeft="6dp"
  246. android:background="@mipmap/icon_sfsb_tx" />
  247. <LinearLayout
  248. android:layout_width="wrap_content"
  249. android:layout_height="wrap_content"
  250. android:layout_centerVertical="true"
  251. android:layout_marginLeft="10dp"
  252. android:layout_toRightOf="@+id/imgLetB"
  253. android:orientation="vertical">
  254. <TextView
  255. android:layout_width="wrap_content"
  256. android:layout_height="wrap_content"
  257. android:text="请正对屏幕并使脸位于取景框内"
  258. android:textColor="@color/black"
  259. android:textSize="12sp" />
  260. <TextView
  261. android:layout_width="wrap_content"
  262. android:layout_height="wrap_content"
  263. android:text="请保持光线充足,避免光照过强或过弱"
  264. android:textColor="@color/black"
  265. android:textSize="12sp" />
  266. </LinearLayout>
  267. </RelativeLayout>
  268. <Button
  269. android:id="@+id/butAgain"
  270. android:layout_width="wrap_content"
  271. android:layout_height="40dp"
  272. android:layout_gravity="center"
  273. android:layout_marginTop="16dp"
  274. android:background="@drawable/bg_sou_suo"
  275. android:text="重新验证"
  276. android:textColor="@color/white"
  277. android:visibility="gone" />
  278. </LinearLayout>
  279. </LinearLayout>
  280. </LinearLayout>
  281. <Button
  282. android:id="@+id/tvReturn"
  283. android:layout_width="85dp"
  284. android:layout_height="30dp"
  285. android:layout_alignParentBottom="true"
  286. android:layout_marginBottom="20dp"
  287. android:background="@drawable/bg_retrun"
  288. android:text="返回180s"
  289. android:textColor="@color/white"
  290. android:textSize="12sp" />
  291. </RelativeLayout>