| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <?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"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/activity_main"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:keepScreenOn="true"
- tools:ignore="MissingDefaultResource">
- <!--屏幕常亮-->
- <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"
- android:id="@+id/fl_camera_size">
- <com.otaliastudios.cameraview.CameraView
- android:id="@+id/camera"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:keepScreenOn="true"
- app:cameraExperimental="true"
- app:cameraEngine="camera2"
- app:cameraPreview="glSurface"
- app:cameraPlaySounds="true"
- app:cameraGrid="off"
- app:cameraFlash="off"
- app:cameraAudio="off"
- app:cameraFacing="back"
- app:cameraGestureTap="none"
- app:cameraGestureLongTap="none"
- app:cameraGesturePinch="none"
- app:cameraGestureScrollHorizontal="filterControl1"
- app:cameraGestureScrollVertical="exposureCorrection"
- app:cameraMode="picture"
- app:cameraUseDeviceOrientation="false"
- app:cameraAutoFocusMarker="@string/cameraview_default_autofocus_marker">
- </com.otaliastudios.cameraview.CameraView>
- <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"
- android:padding="2dp"/>
- <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>
|