├── .gitignore
├── .idea
├── dictionaries
│ ├── 2015_249_pc.xml
│ └── Jinlin.xml
├── libraries
│ ├── android_support_v4.xml
│ ├── animated_vector_drawable_23_2_1.xml
│ ├── appcompat_v7_23_2_1.xml
│ ├── core.xml
│ ├── core_3_1_1_SNAPSHOT.xml
│ ├── support_annotations_23_2_1.xml
│ ├── support_v4_23_2_1.xml
│ ├── support_vector_drawable_23_2_1.xml
│ └── zxing.xml
└── runConfigurations.xml
├── BarcodeScanner-master.gif
├── QRCode.iml
├── QR_CodeScan.gif
├── README.md
├── ZXingScanQRCode.gif
├── build.gradle
├── demo.gif
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── settings.gradle
├── zxing-demo-1
├── .classpath
├── .gitignore
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── build.gradle
├── ic_launcher-web.png
├── libs
│ ├── android-support-v4.jar
│ └── core-3.1.1-SNAPSHOT.jar
├── proguard-project.txt
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ ├── ic_launcher.png
│ │ ├── scan_corner_bottom_left.png
│ │ ├── scan_corner_bottom_right.png
│ │ ├── scan_corner_top_left.png
│ │ ├── scan_corner_top_right.png
│ │ ├── scan_fail.png
│ │ ├── scan_flashlight_normal.png
│ │ ├── scan_flashlight_pressed.png
│ │ ├── scan_history_normal.png
│ │ ├── scan_history_pressed.png
│ │ ├── scan_laser.png
│ │ ├── scan_photo_normal.png
│ │ ├── scan_photo_pressed.png
│ │ └── thumb_unfocus.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── drawable
│ │ ├── scan_flashlight.xml
│ │ ├── scan_history.xml
│ │ ├── scan_photo.xml
│ │ ├── seekbar_bg.xml
│ │ └── seekbar_style.xml
│ ├── layout
│ │ └── capture.xml
│ ├── raw
│ │ └── beep.ogg
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-v14
│ │ └── styles.xml
│ └── values
│ │ ├── colors.xml
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── src
│ └── com
│ │ ├── google
│ │ └── zxing
│ │ │ ├── camera
│ │ │ ├── AutoFocusManager.java
│ │ │ ├── CameraConfigurationManager.java
│ │ │ ├── CameraManager.java
│ │ │ ├── FrontLightMode.java
│ │ │ ├── OpenCameraInterface.java
│ │ │ └── PreviewCallback.java
│ │ │ ├── common
│ │ │ ├── BitmapUtils.java
│ │ │ └── Runnable.java
│ │ │ ├── config
│ │ │ └── Config.java
│ │ │ ├── decode
│ │ │ ├── BitmapDecoder.java
│ │ │ ├── BitmapLuminanceSource.java
│ │ │ ├── CaptureActivityHandler.java
│ │ │ ├── DecodeFormatManager.java
│ │ │ ├── DecodeHandler.java
│ │ │ ├── DecodeThread.java
│ │ │ ├── FinishListener.java
│ │ │ └── Intents.java
│ │ │ └── view
│ │ │ ├── ViewfinderResultPointCallback.java
│ │ │ └── ViewfinderView.java
│ │ └── jinlin
│ │ └── zxing
│ │ ├── AmbientLightManager.java
│ │ ├── BeepManager.java
│ │ ├── CaptureActivity.java
│ │ ├── InactivityTimer.java
│ │ └── IntentSource.java
└── zxing-demo-1.iml
├── zxing-demo-2
├── .gitignore
├── AndroidManifest.xml
├── build.gradle
├── libs
│ └── core-3.1.1-SNAPSHOT.jar
├── res
│ ├── drawable-hdpi
│ │ ├── ic_launcher.png
│ │ ├── scan_flashlight_normal.png
│ │ ├── scan_flashlight_pressed.png
│ │ ├── scan_photo_normal.png
│ │ └── scan_photo_pressed.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── qr_code_bg.9.png
│ │ ├── scan_flashlight_normal.png
│ │ ├── scan_flashlight_pressed.png
│ │ ├── scan_line.png
│ │ ├── scan_mask.png
│ │ ├── scan_photo_normal.png
│ │ └── scan_photo_pressed.png
│ ├── drawable
│ │ ├── scan_flashlight.xml
│ │ └── scan_photo.xml
│ ├── layout
│ │ ├── activity_capture.xml
│ │ ├── activity_main.xml
│ │ └── activity_result.xml
│ ├── raw
│ │ └── beep.ogg
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-v14
│ │ └── styles.xml
│ └── values
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ ├── google
│ └── zxing
│ │ ├── activity
│ │ └── CaptureActivity.java
│ │ ├── camera
│ │ ├── AutoFocusManager.java
│ │ ├── CameraConfigurationManager.java
│ │ ├── CameraManager.java
│ │ └── PreviewCallback.java
│ │ ├── decode
│ │ ├── BitmapDecoder.java
│ │ ├── BitmapLuminanceSource.java
│ │ ├── DecodeFormatManager.java
│ │ ├── DecodeHandler.java
│ │ └── DecodeThread.java
│ │ ├── open
│ │ └── OpenCameraInterface.java
│ │ └── utils
│ │ ├── BeepManager.java
│ │ ├── BitmapUtils.java
│ │ ├── CaptureActivityHandler.java
│ │ └── InactivityTimer.java
│ └── jinlin
│ └── zxing
│ ├── MainActivity.java
│ └── ResultActivity.java
├── zxing-demo-3
├── .gitignore
├── build.gradle
├── libs
│ └── zxing.jar
├── proguard-rules.pro
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ ├── google
│ │ │ └── zxing
│ │ │ │ ├── activity
│ │ │ │ └── CaptureActivity.java
│ │ │ │ ├── camera
│ │ │ │ ├── AutoFocusCallback.java
│ │ │ │ ├── CameraConfigurationManager.java
│ │ │ │ ├── CameraManager.java
│ │ │ │ ├── FlashlightManager.java
│ │ │ │ ├── PlanarYUVLuminanceSource.java
│ │ │ │ └── PreviewCallback.java
│ │ │ │ ├── decoding
│ │ │ │ ├── CaptureActivityHandler.java
│ │ │ │ ├── DecodeFormatManager.java
│ │ │ │ ├── DecodeHandler.java
│ │ │ │ ├── DecodeThread.java
│ │ │ │ ├── FinishListener.java
│ │ │ │ ├── InactivityTimer.java
│ │ │ │ └── Intents.java
│ │ │ │ ├── encoding
│ │ │ │ └── EncodingHandler.java
│ │ │ │ └── view
│ │ │ │ ├── ViewfinderResultPointCallback.java
│ │ │ │ └── ViewfinderView.java
│ │ │ └── jinlin
│ │ │ └── zxing
│ │ │ ├── MainActivity.java
│ │ │ └── utils
│ │ │ └── DensityUtils.java
│ │ └── res
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── camera.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ ├── btn_header_barcode.png
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── raw
│ │ └── beep.ogg
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── zxing-demo-3.iml
└── zxing-demo-4
├── .classpath
├── .gitignore
├── .project
├── .settings
├── org.eclipse.core.resources.prefs
└── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── build.gradle
├── ic_launcher-web.png
├── libs
├── android-support-v4.jar
└── core.jar
├── proguard-project.txt
├── project.properties
├── res
├── drawable-hdpi
│ ├── ic_launcher.png
│ └── qrcode_scan_line.png
├── drawable-mdpi
│ └── ic_launcher.png
├── drawable-xhdpi
│ └── ic_launcher.png
├── layout
│ ├── activity_capture.xml
│ └── activity_main.xml
├── menu
│ └── activity_main.xml
├── raw
│ └── beep.ogg
├── values-v11
│ └── styles.xml
├── values-v14
│ └── styles.xml
└── values
│ ├── color.xml
│ ├── ids.xml
│ ├── strings.xml
│ └── styles.xml
└── src
└── com
├── google
└── zxing
│ └── zxing
│ ├── activity
│ └── MipcaActivityCapture.java
│ ├── camera
│ ├── AutoFocusCallback.java
│ ├── CameraConfigurationManager.java
│ ├── CameraManager.java
│ ├── FlashlightManager.java
│ ├── PlanarYUVLuminanceSource.java
│ └── PreviewCallback.java
│ ├── decoding
│ ├── CaptureActivityHandler.java
│ ├── DecodeFormatManager.java
│ ├── DecodeHandler.java
│ ├── DecodeThread.java
│ ├── FinishListener.java
│ ├── InactivityTimer.java
│ └── Intents.java
│ ├── image
│ └── RGBLuminanceSource.java
│ └── view
│ ├── ViewfinderResultPointCallback.java
│ └── ViewfinderView.java
└── jinlin
└── zxing
└── MainActivity.java
/.gitignore:
--------------------------------------------------------------------------------
1 | /gradlew
2 | /gradlew.bat
3 | /.idea
4 | ### Android template
5 | # Built application files
6 | *.apk
7 | *.ap_
8 |
9 | # Files for the Dalvik VM
10 | *.dex
11 |
12 | # Java class files
13 | *.class
14 |
15 | # Generated files
16 | bin/
17 | gen/
18 |
19 | # Gradle files
20 | .gradle/
21 | build/
22 |
23 | # Local configuration file (sdk path, etc)
24 | local.properties
25 |
26 | # Proguard folder generated by Eclipse
27 | proguard/
28 |
29 | # Log Files
30 | *.log
31 |
32 | # Android Studio Navigation editor temp files
33 | .navigation/
34 |
35 | # Created by .ignore support plugin (hsz.mobi)
36 |
--------------------------------------------------------------------------------
/.idea/dictionaries/2015_249_pc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/dictionaries/Jinlin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/libraries/android_support_v4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/animated_vector_drawable_23_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/appcompat_v7_23_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/core_3_1_1_SNAPSHOT.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/support_annotations_23_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/support_v4_23_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/support_vector_drawable_23_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/zxing.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/BarcodeScanner-master.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/BarcodeScanner-master.gif
--------------------------------------------------------------------------------
/QR_CodeScan.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/QR_CodeScan.gif
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ============
2 |
3 | 精简ZXing项目后只保留扫描功能的代码,去除了ViewfinderView,使用XML布局
4 | ============
5 | 
6 | ============
7 | 
8 | ============
9 | 
10 | ============
11 | 
12 |
--------------------------------------------------------------------------------
/ZXingScanQRCode.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/ZXingScanQRCode.gif
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | jcenter()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:2.1.2'
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/demo.gif
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Apr 26 16:55:04 CST 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':zxing-demo-1'
2 | include ':zxing-demo-2'
3 | include ':zxing-demo-3'
4 | include ':zxing-demo-4'
5 |
--------------------------------------------------------------------------------
/zxing-demo-1/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/zxing-demo-1/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 |
19 | # Local configuration file (sdk path, etc)
20 | local.properties
21 |
22 | # Proguard folder generated by Eclipse
23 | proguard/
24 |
--------------------------------------------------------------------------------
/zxing-demo-1/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | BarcodeScanner
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/zxing-demo-1/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.source=1.6
5 |
--------------------------------------------------------------------------------
/zxing-demo-1/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
26 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/zxing-demo-1/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | dependencies {
4 | compile fileTree(dir: 'libs', include: '*.jar')
5 | }
6 |
7 | android {
8 | compileSdkVersion 23
9 | buildToolsVersion "23.0.2"
10 |
11 | sourceSets {
12 | main {
13 | manifest.srcFile 'AndroidManifest.xml'
14 | java.srcDirs = ['src']
15 | resources.srcDirs = ['src']
16 | aidl.srcDirs = ['src']
17 | renderscript.srcDirs = ['src']
18 | res.srcDirs = ['res']
19 | assets.srcDirs = ['assets']
20 | }
21 |
22 | // Move the tests to tests/java, tests/res, etc...
23 | instrumentTest.setRoot('tests')
24 |
25 | // Move the build types to build-types/
26 | // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
27 | // This moves them out of them default location under src//... which would
28 | // conflict with src/ being used by the main source set.
29 | // Adding new build types or product flavors should be accompanied
30 | // by a similar customization.
31 | debug.setRoot('build-types/debug')
32 | release.setRoot('build-types/release')
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/zxing-demo-1/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/ic_launcher-web.png
--------------------------------------------------------------------------------
/zxing-demo-1/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/zxing-demo-1/libs/core-3.1.1-SNAPSHOT.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/libs/core-3.1.1-SNAPSHOT.jar
--------------------------------------------------------------------------------
/zxing-demo-1/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/zxing-demo-1/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-19
15 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_corner_bottom_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_corner_bottom_left.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_corner_bottom_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_corner_bottom_right.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_corner_top_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_corner_top_left.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_corner_top_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_corner_top_right.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_fail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_fail.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_flashlight_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_flashlight_normal.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_flashlight_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_flashlight_pressed.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_history_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_history_normal.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_history_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_history_pressed.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_laser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_laser.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_photo_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_photo_normal.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/scan_photo_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/scan_photo_pressed.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-hdpi/thumb_unfocus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-hdpi/thumb_unfocus.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable/scan_flashlight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable/scan_history.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable/scan_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable/seekbar_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/drawable/seekbar_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
14 |
15 |
16 | -
17 |
18 |
19 |
20 |
21 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/layout/capture.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
19 |
20 |
26 |
27 |
33 |
34 |
42 |
43 |
44 |
55 |
56 |
62 |
63 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/raw/beep.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5peak2me/QRCode/bdcf5984cde598c52299ca7f3801ccdc1191deed/zxing-demo-1/res/raw/beep.ogg
--------------------------------------------------------------------------------
/zxing-demo-1/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #ff000000
5 | #ffffffff
6 | #c0ffbd21
7 | #ffc0c0c0
8 | #c099cc00
9 | #ffffffff
10 | #b0000000
11 | #ffffffff
12 | #00000000
13 | #ffcc0000
14 | #00000000
15 | #00000000
16 | #fff6f6f6
17 |
18 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 二维条形码扫描
4 | placeHolder
5 | +
6 | -
7 | 生成
8 | 扫描失败
9 | 建议与镜头保持10CM距离,尽量避免逆光和阴影
10 | 将条形码或二维码置于取景框内系统会自动扫描
11 | 取消
12 | 抱歉,Android相机出现问题。您可能需要重启设备。
13 | 确定
14 |
15 |
--------------------------------------------------------------------------------
/zxing-demo-1/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/zxing-demo-1/src/com/google/zxing/camera/AutoFocusManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.camera;
18 |
19 | import java.util.ArrayList;
20 | import java.util.Collection;
21 |
22 | import android.content.Context;
23 | import android.content.SharedPreferences;
24 | import android.hardware.Camera;
25 | import android.os.AsyncTask;
26 | import android.preference.PreferenceManager;
27 | import android.util.Log;
28 | import com.google.zxing.common.Runnable;
29 | import com.google.zxing.config.Config;
30 |
31 | /**
32 | * 由于对焦不是一次性完成的任务(手抖),而系统提供的对焦仅有Camera.autoFocus()方法,
33 | * 因此需要一个线程来不断调用Camera.autoFocus()直到用户满意按下快门为止
34 | */
35 | final class AutoFocusManager implements Camera.AutoFocusCallback {
36 |
37 | private static final String TAG = AutoFocusManager.class.getSimpleName();
38 |
39 | private static final long AUTO_FOCUS_INTERVAL_MS = 2000L;
40 | private static final Collection FOCUS_MODES_CALLING_AF;
41 | static {
42 | FOCUS_MODES_CALLING_AF = new ArrayList(2);
43 | FOCUS_MODES_CALLING_AF.add(Camera.Parameters.FOCUS_MODE_AUTO);
44 | FOCUS_MODES_CALLING_AF.add(Camera.Parameters.FOCUS_MODE_MACRO);
45 | }
46 |
47 | private boolean active;
48 | private final boolean useAutoFocus;
49 | private final Camera camera;
50 | private AsyncTask, ?, ?> outstandingTask;
51 |
52 | AutoFocusManager(Context context, Camera camera) {
53 | this.camera = camera;
54 | SharedPreferences sharedPrefs = PreferenceManager
55 | .getDefaultSharedPreferences(context);
56 | String currentFocusMode = camera.getParameters().getFocusMode();
57 | useAutoFocus = sharedPrefs.getBoolean(Config.KEY_AUTO_FOCUS, true)
58 | && FOCUS_MODES_CALLING_AF.contains(currentFocusMode);
59 | Log.i(TAG, "Current focus mode '" + currentFocusMode
60 | + "'; use auto focus? " + useAutoFocus);
61 | start();
62 | }
63 |
64 | @Override
65 | public synchronized void onAutoFocus(boolean success, Camera theCamera) {
66 | if (active) {
67 | outstandingTask = new AutoFocusTask();
68 | Runnable.execAsync(outstandingTask);
69 | }
70 | }
71 |
72 | synchronized void start() {
73 | if (useAutoFocus) {
74 | active = true;
75 | try {
76 | camera.autoFocus(this);
77 | }
78 | catch (RuntimeException re) {
79 | // Have heard RuntimeException reported in Android 4.0.x+;
80 | // continue?
81 | Log.w(TAG, "Unexpected exception while focusing", re);
82 | }
83 | }
84 | }
85 |
86 | synchronized void stop() {
87 | if (useAutoFocus) {
88 | try {
89 | camera.cancelAutoFocus();
90 | }
91 | catch (RuntimeException re) {
92 | // Have heard RuntimeException reported in Android 4.0.x+;
93 | // continue?
94 | Log.w(TAG, "Unexpected exception while cancelling focusing", re);
95 | }
96 | }
97 | if (outstandingTask != null) {
98 | outstandingTask.cancel(true);
99 | outstandingTask = null;
100 | }
101 | active = false;
102 | }
103 |
104 | private final class AutoFocusTask extends AsyncTask