lib -> zxing-lite

This commit is contained in:
Jenly
2021-06-30 14:02:57 +08:00
parent 63f78fd8e6
commit 6a28ea25ba
42 changed files with 1963 additions and 1954 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/zxl_flashlight_on"/>
<item android:drawable="@drawable/zxl_flashlight_off"/>
</selector>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.camera.view.PreviewView
android:id="@+id/previewView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.king.zxing.ViewfinderView
android:id="@+id/viewfinderView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ImageView
android:id="@+id/ivFlashlight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/zxl_flashlight_selector"
android:layout_marginTop="@dimen/zxl_flashlight_margin_top" />
</FrameLayout>

Binary file not shown.

View File

@@ -0,0 +1,46 @@
<resources>
<declare-styleable name="ViewfinderView">
<attr name="maskColor" format="color" />
<attr name="frameColor" format="color" />
<attr name="cornerColor" format="color"/>
<attr name="laserColor" format="color"/>
<attr name="labelText" format="string"/>
<attr name="labelTextColor" format="color"/>
<attr name="labelTextSize" format="dimension"/>
<attr name="labelTextPadding" format="dimension"/>
<attr name="labelTextWidth" format="dimension"/>
<attr name="labelTextLocation" format="enum">
<enum name="top" value="0"/>
<enum name="bottom" value="1"/>
</attr>
<attr name="frameWidth" format="dimension"/>
<attr name="frameHeight" format="dimension"/>
<attr name="gridColumn" format="integer"/>
<attr name="gridHeight" format="dimension"/>
<attr name="laserStyle" format="enum">
<enum name="none" value="0"/>
<enum name="line" value="1"/>
<enum name="grid" value="2"/>
</attr>
<attr name="cornerRectWidth" format="dimension"/>
<attr name="cornerRectHeight" format="dimension"/>
<attr name="scannerLineMoveDistance" format="dimension"/>
<attr name="scannerLineHeight" format="dimension"/>
<attr name="frameLineWidth" format="dimension"/>
<attr name="scannerAnimationDelay" format="integer"/>
<attr name="frameRatio" format="float"/>
<attr name="framePaddingLeft" format="dimension"/>
<attr name="framePaddingTop" format="dimension"/>
<attr name="framePaddingRight" format="dimension"/>
<attr name="framePaddingBottom" format="dimension"/>
<attr name="frameGravity" format="enum">
<enum name="center" value="0"/>
<enum name="left" value="1"/>
<enum name="top" value="2"/>
<enum name="right" value="3"/>
<enum name="bottom" value="4"/>
</attr>
</declare-styleable>
</resources>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="viewfinder_mask">#60000000</color>
<color name="viewfinder_frame">#7F1FB3E2</color>
<color name="viewfinder_corner">#FF1FB3E2</color>
<color name="viewfinder_laser">#FF1FB3E2</color>
<color name="viewfinder_text_color">#FFC0C0C0</color>
<color name="zxl_capture_status_bar_color">#00000000</color>
<color name="zxl_capture_navigation_bar_color">#00000000</color>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="zxl_flashlight_margin_top">80dp</dimen>
</resources>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CaptureTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@android:color/black</item>
<item name="colorPrimaryDark">@android:color/black</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:statusBarColor">@color/zxl_capture_status_bar_color</item>
<item name="android:navigationBarColor">@color/zxl_capture_navigation_bar_color</item>
</style>
</resources>