封装二维码扫描业务
This commit is contained in:
49
app/src/main/res/layout/activity_qr_code.xml
Normal file
49
app/src/main/res/layout/activity_qr_code.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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"
|
||||
tools:context=".ui.activity.scan.QRCodeActivity">
|
||||
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="activity"
|
||||
type="com.navinfo.omqs.ui.activity.scan.QRCodeActivity" />
|
||||
|
||||
<variable
|
||||
name="qrCodeModel"
|
||||
type="com.navinfo.omqs.ui.activity.scan.QRCodeViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.helper.widget.Layer
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:constraint_referenced_ids="previewView,scanView"
|
||||
tools:ignore="MissingConstraints">
|
||||
|
||||
</androidx.constraintlayout.helper.widget.Layer>
|
||||
|
||||
|
||||
<androidx.camera.view.PreviewView
|
||||
android:id="@+id/previewView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.navinfo.omqs.ui.widget.ScanView
|
||||
android:id="@+id/scanView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
19
app/src/main/res/layout/activity_result.xml
Normal file
19
app/src/main/res/layout/activity_result.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
android:text="返回"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user