add qrcode scan on dev kit connect

This commit is contained in:
王劲鹏
2019-11-09 16:57:45 +08:00
parent 49a349a41e
commit 053166ab7b
7 changed files with 149 additions and 11 deletions

View File

@@ -1,6 +1,5 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -10,11 +9,8 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:text="Debug via Visual Studio Code"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:text="Dev Kit"
android:textSize="20sp" />
<View
android:layout_width="match_parent"
@@ -26,9 +22,19 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:text="Debug via Visual Studio Code"
android:textSize="20sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#cccccc" />
<TextView
android:id="@+id/menu3_text_view"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:text="Enable Hot Reload"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/menu1_text_view" />
android:textSize="20sp" />
</LinearLayout>

View File

@@ -0,0 +1,20 @@
<?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:layout_width="match_parent"
android:layout_height="match_parent">
<cn.bingoogolapple.qrcode.zxing.ZXingView
android:id="@+id/zxingview"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:qrcv_animTime="1000"
app:qrcv_borderColor="@android:color/white"
app:qrcv_borderSize="1dp"
app:qrcv_cornerLength="20dp"
app:qrcv_cornerSize="3dp"
app:qrcv_maskColor="#33FFFFFF"
app:qrcv_rectWidth="200dp"
app:qrcv_scanLineSize="1dp"
app:qrcv_topOffset="90dp" />
</LinearLayout>