activity_barcode_capture.xml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:orientation="vertical" >
  6. <RelativeLayout
  7. android:id="@+id/capture_container"
  8. android:layout_width="match_parent"
  9. android:layout_height="match_parent" >
  10. <FrameLayout
  11. android:id="@+id/capture_preview"
  12. android:layout_width="match_parent"
  13. android:layout_height="match_parent" />
  14. <ImageView
  15. android:id="@+id/capture_mask_top"
  16. android:layout_width="match_parent"
  17. android:layout_height="60dp"
  18. android:layout_alignParentTop="true"
  19. android:background="@drawable/shadow" />
  20. <RelativeLayout
  21. android:id="@+id/capture_crop_view"
  22. android:layout_width="match_parent"
  23. android:layout_height="match_parent"
  24. android:layout_centerHorizontal="true"
  25. android:layout_below="@id/capture_mask_top"
  26. android:background="@drawable/qr_code_bg" >
  27. <ImageView
  28. android:id="@+id/capture_scan_line"
  29. android:layout_width="match_parent"
  30. android:layout_height="wrap_content"
  31. android:layout_alignParentTop="true"
  32. android:layout_marginLeft="10dp"
  33. android:layout_marginRight="10dp"
  34. android:layout_marginBottom="5dp"
  35. android:layout_marginTop="5dp"
  36. android:src="@drawable/scan_line" />
  37. </RelativeLayout>
  38. <ImageView
  39. android:id="@+id/capture_mask_bottom"
  40. android:layout_width="match_parent"
  41. android:layout_height="wrap_content"
  42. android:layout_alignParentBottom="true"
  43. android:layout_below="@id/capture_crop_view"
  44. android:background="@drawable/shadow" />
  45. <ImageView
  46. android:id="@+id/capture_mask_left"
  47. android:layout_width="wrap_content"
  48. android:layout_height="match_parent"
  49. android:layout_above="@id/capture_mask_bottom"
  50. android:layout_alignParentLeft="true"
  51. android:layout_below="@id/capture_mask_top"
  52. android:layout_toLeftOf="@id/capture_crop_view"
  53. android:background="@drawable/shadow" />
  54. <ImageView
  55. android:id="@+id/capture_mask_right"
  56. android:layout_width="wrap_content"
  57. android:layout_height="match_parent"
  58. android:layout_above="@id/capture_mask_bottom"
  59. android:layout_alignParentRight="true"
  60. android:layout_below="@id/capture_mask_top"
  61. android:layout_toRightOf="@id/capture_crop_view"
  62. android:background="@drawable/shadow" />
  63. </RelativeLayout>
  64. <Button
  65. android:id="@+id/flashLight"
  66. android:layout_width="match_parent"
  67. android:layout_height="40dp"
  68. android:layout_alignParentBottom="true"
  69. android:background="#66ffcc00"
  70. android:gravity="center"
  71. android:textColor="@android:color/white"
  72. android:textSize="14sp" />
  73. <TextView
  74. android:id="@+id/capture_scan_result"
  75. android:layout_width="match_parent"
  76. android:layout_height="wrap_content"
  77. android:layout_above="@id/flashLight"
  78. android:layout_marginBottom="10dp"
  79. android:gravity="center"
  80. android:text="扫描中..."
  81. android:textColor="@android:color/white"
  82. android:textSize="14sp" />
  83. </RelativeLayout>