activity_scan.xml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. tools:context="cn.x1ongzhu.qrCodeScanner.ScanActivity">
  8. <cn.bingoogolapple.qrcode.zxing.ZXingView
  9. android:id="@+id/zxingview"
  10. android:layout_width="match_parent"
  11. android:layout_height="match_parent"
  12. app:qrcv_animTime="1000"
  13. app:qrcv_barCodeTipText="将条码放入框内,即可自动扫描"
  14. app:qrcv_barcodeRectHeight="140dp"
  15. app:qrcv_borderColor="@android:color/white"
  16. app:qrcv_borderSize="1dp"
  17. app:qrcv_cornerColor="#2face9"
  18. app:qrcv_cornerLength="10dp"
  19. app:qrcv_cornerSize="3dp"
  20. app:qrcv_isBarcode="false"
  21. app:qrcv_isCenterVertical="false"
  22. app:qrcv_isOnlyDecodeScanBoxArea="true"
  23. app:qrcv_isScanLineReverse="true"
  24. app:qrcv_isShowDefaultGridScanLineDrawable="false"
  25. app:qrcv_isShowDefaultScanLineDrawable="true"
  26. app:qrcv_isShowTipBackground="true"
  27. app:qrcv_isShowTipTextAsSingleLine="false"
  28. app:qrcv_isTipTextBelowRect="false"
  29. app:qrcv_maskColor="#66000000"
  30. app:qrcv_qrCodeTipText="将二维码放入框内\n即可自动扫描"
  31. app:qrcv_rectWidth="170dp"
  32. app:qrcv_scanLineColor="#2face9"
  33. app:qrcv_scanLineMargin="0dp"
  34. app:qrcv_scanLineSize="0.5dp"
  35. app:qrcv_tipTextColor="@android:color/white"
  36. app:qrcv_tipTextSize="12sp"
  37. app:qrcv_toolbarHeight="160dp"
  38. app:qrcv_topOffset="0dp" />
  39. <ImageButton
  40. android:id="@+id/btn_flash"
  41. android:layout_width="64dp"
  42. android:layout_height="64dp"
  43. android:layout_alignParentBottom="true"
  44. android:layout_centerHorizontal="true"
  45. android:layout_marginBottom="60dp"
  46. android:background="@null"
  47. android:scaleType="fitXY"
  48. android:src="@drawable/ic_flash" />
  49. <ImageButton
  50. android:id="@+id/btn_back"
  51. android:layout_width="wrap_content"
  52. android:layout_height="wrap_content"
  53. android:layout_marginLeft="15dp"
  54. android:layout_marginTop="15dp"
  55. android:background="@null"
  56. android:src="@drawable/prev" />
  57. </RelativeLayout>