lib -> zxing-lite
This commit is contained in:
BIN
zxing-lite/src/main/res/drawable-xxhdpi/zxl_flashlight_off.png
Normal file
BIN
zxing-lite/src/main/res/drawable-xxhdpi/zxl_flashlight_off.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
zxing-lite/src/main/res/drawable-xxhdpi/zxl_flashlight_on.png
Normal file
BIN
zxing-lite/src/main/res/drawable-xxhdpi/zxl_flashlight_on.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -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>
|
||||
21
zxing-lite/src/main/res/layout/zxl_capture.xml
Normal file
21
zxing-lite/src/main/res/layout/zxl_capture.xml
Normal 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>
|
||||
BIN
zxing-lite/src/main/res/raw/zxl_beep.mp3
Normal file
BIN
zxing-lite/src/main/res/raw/zxl_beep.mp3
Normal file
Binary file not shown.
46
zxing-lite/src/main/res/values/attrs.xml
Normal file
46
zxing-lite/src/main/res/values/attrs.xml
Normal 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>
|
||||
13
zxing-lite/src/main/res/values/colors.xml
Normal file
13
zxing-lite/src/main/res/values/colors.xml
Normal 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>
|
||||
4
zxing-lite/src/main/res/values/dimens.xml
Normal file
4
zxing-lite/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="zxl_flashlight_margin_top">80dp</dimen>
|
||||
</resources>
|
||||
15
zxing-lite/src/main/res/values/styles.xml
Normal file
15
zxing-lite/src/main/res/values/styles.xml
Normal 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>
|
||||
Reference in New Issue
Block a user