|
|
@@ -0,0 +1,210 @@
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
+ xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
+ android:id="@+id/activity_main"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:orientation="vertical"
|
|
|
+ android:keepScreenOn="true">
|
|
|
+ <!--屏幕常亮-->
|
|
|
+
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:background="@color/colorPrimary"
|
|
|
+ android:gravity="center_vertical"
|
|
|
+ android:minHeight="64dp"
|
|
|
+ android:orientation="horizontal"
|
|
|
+ android:paddingStart="@dimen/margin_default"
|
|
|
+ android:paddingTop="@dimen/margin_ss"
|
|
|
+ android:paddingEnd="@dimen/margin_default"
|
|
|
+ android:paddingBottom="@dimen/margin_ss">
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:src="@mipmap/logo" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_weight="1"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:gravity="center"
|
|
|
+ android:text="@string/app_name"
|
|
|
+ android:textColor="@color/white"
|
|
|
+ android:textSize="18sp"
|
|
|
+ android:visibility="invisible"/>
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_flash"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:src="@mipmap/flash_close"/>
|
|
|
+ </LinearLayout>
|
|
|
+
|
|
|
+
|
|
|
+ <FrameLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent">
|
|
|
+
|
|
|
+ <com.cjt2325.cameralibrary.JCameraView
|
|
|
+ android:id="@+id/jcameraview"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ app:duration_max="10000" />
|
|
|
+
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:orientation="vertical">
|
|
|
+
|
|
|
+ <FrameLayout
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:layout_weight="370">
|
|
|
+ <!--灰色遮罩-->
|
|
|
+ <com.miekir.ocr.widget.CropView
|
|
|
+ android:id="@+id/pcv_scan"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"/>
|
|
|
+
|
|
|
+ <com.miekir.ocr.widget.ScalableImageView
|
|
|
+ android:id="@+id/iv_animation"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:visibility="invisible"
|
|
|
+ android:scaleType="fitXY"/>
|
|
|
+ </FrameLayout>
|
|
|
+
|
|
|
+ <View
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0.8dp"
|
|
|
+ android:background="@color/white"/>
|
|
|
+
|
|
|
+
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:layout_weight="180"
|
|
|
+ android:orientation="vertical"
|
|
|
+ android:background="@color/black_transparent">
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:gravity="center_vertical"
|
|
|
+ android:orientation="horizontal">
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_weight="1" />
|
|
|
+
|
|
|
+ <com.miekir.ocr.widget.IndicatorText
|
|
|
+ android:id="@+id/it_postal"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ app:text="@string/postal_code" />
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_weight="1" />
|
|
|
+
|
|
|
+ <com.miekir.ocr.widget.IndicatorText
|
|
|
+ android:id="@+id/it_address"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ app:text="@string/address"/>
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_weight="1" />
|
|
|
+
|
|
|
+ <com.miekir.ocr.widget.IndicatorText
|
|
|
+ android:id="@+id/it_name"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ app:text="@string/name"/>
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_weight="1" />
|
|
|
+
|
|
|
+ <com.miekir.ocr.widget.IndicatorText
|
|
|
+ android:id="@+id/it_all"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ app:text="@string/full"
|
|
|
+ app:focused="true"/>
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_weight="1" />
|
|
|
+ </LinearLayout>
|
|
|
+
|
|
|
+
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:gravity="center_vertical"
|
|
|
+ android:orientation="horizontal"
|
|
|
+ android:paddingBottom="@dimen/margin_default">
|
|
|
+
|
|
|
+ <RelativeLayout
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_weight="1">
|
|
|
+
|
|
|
+ <FrameLayout
|
|
|
+ android:id="@+id/fl_album"
|
|
|
+ android:foreground="@drawable/ripple_effect"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_centerInParent="true"
|
|
|
+ android:padding="@dimen/margin_default">
|
|
|
+ <ImageView
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:src="@mipmap/button_album"/>
|
|
|
+ </FrameLayout>
|
|
|
+
|
|
|
+ </RelativeLayout>
|
|
|
+
|
|
|
+ <FrameLayout
|
|
|
+ android:id="@+id/fl_take"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:foreground="@drawable/ripple_effect">
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_gravity="center"
|
|
|
+ android:src="@mipmap/button_take" />
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_gravity="center"
|
|
|
+ android:src="@mipmap/button_take_out" />
|
|
|
+ </FrameLayout>
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_orientation"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginStart="@dimen/margin_default"
|
|
|
+ android:layout_marginEnd="@dimen/margin_default"
|
|
|
+ android:layout_weight="1"
|
|
|
+ android:gravity="center"
|
|
|
+ android:text="@string/landscape"
|
|
|
+ android:textColor="@color/colorPrimary"
|
|
|
+ android:textSize="@dimen/size_text_title_p"/>
|
|
|
+ </LinearLayout>
|
|
|
+ </LinearLayout>
|
|
|
+ </LinearLayout>
|
|
|
+ </FrameLayout>
|
|
|
+</LinearLayout>
|