diff --git a/.gitignore b/.gitignore
index dc42d53..d54fd23 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,7 @@
*.iml
.gradle
/local.properties
-/.idea/libraries
-/.idea/modules.xml
-/.idea/workspace.xml
+/.idea
.DS_Store
/build
/captures
diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
deleted file mode 100644
index 45853aa..0000000
--- a/.idea/assetWizardSettings.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
deleted file mode 100644
index a9d52d5..0000000
Binary files a/.idea/caches/build_file_checksums.ser and /dev/null differ
diff --git a/.idea/caches/gradle_models.ser b/.idea/caches/gradle_models.ser
deleted file mode 100644
index 8366bc2..0000000
Binary files a/.idea/caches/gradle_models.ser and /dev/null differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index e4901c8..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/dbnavigator.xml b/.idea/dbnavigator.xml
deleted file mode 100644
index 8095114..0000000
--- a/.idea/dbnavigator.xml
+++ /dev/null
@@ -1,456 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index 286ca11..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
deleted file mode 100644
index 5d6f65c..0000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml
deleted file mode 100644
index 2d579f3..0000000
--- a/.idea/markdown-navigator.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/markdown-navigator/profiles_settings.xml b/.idea/markdown-navigator/profiles_settings.xml
deleted file mode 100644
index fe56b1e..0000000
--- a/.idea/markdown-navigator/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index cc04cd3..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/java/com/king/zxing/app/CustomActivity.java b/app/src/main/java/com/king/zxing/app/CustomActivity.java
index 3c50672..d56082f 100644
--- a/app/src/main/java/com/king/zxing/app/CustomActivity.java
+++ b/app/src/main/java/com/king/zxing/app/CustomActivity.java
@@ -1,10 +1,10 @@
package com.king.zxing.app;
+import android.app.Activity;
import android.hardware.Camera;
import android.os.Bundle;
-import android.app.Activity;
-import android.support.v7.app.AppCompatActivity;
import android.support.v4.app.Fragment;
+import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MotionEvent;
import android.view.SurfaceView;
@@ -13,7 +13,6 @@ import android.widget.TextView;
import android.widget.Toast;
import com.king.zxing.CaptureHelper;
-import com.king.zxing.DecodeFormatManager;
import com.king.zxing.OnCaptureCallback;
import com.king.zxing.ViewfinderView;
import com.king.zxing.app.util.StatusBarUtils;
@@ -56,6 +55,7 @@ public class CustomActivity extends AppCompatActivity implements OnCaptureCallba
isContinuousScan = getIntent().getBooleanExtra(MainActivity.KEY_IS_CONTINUOUS,false);
mCaptureHelper = new CaptureHelper(this,surfaceView,viewfinderView);
+ mCaptureHelper.setOnCaptureCallback(this);
mCaptureHelper.onCreate();
mCaptureHelper.vibrate(true)
.fullScreenScan(true)//全屏扫码
diff --git a/app/src/main/java/com/king/zxing/app/CustomCaptureActivity.java b/app/src/main/java/com/king/zxing/app/CustomCaptureActivity.java
index 5c11a94..4e68d3f 100644
--- a/app/src/main/java/com/king/zxing/app/CustomCaptureActivity.java
+++ b/app/src/main/java/com/king/zxing/app/CustomCaptureActivity.java
@@ -24,7 +24,6 @@ import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
-import com.google.zxing.DecodeHintType;
import com.king.zxing.CaptureActivity;
import com.king.zxing.app.util.StatusBarUtils;
import com.king.zxing.camera.CameraConfigurationUtils;
@@ -87,7 +86,6 @@ public class CustomCaptureActivity extends CaptureActivity {
return getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH);
}
-
/**
* 扫码结果回调
* @param result 扫码结果
diff --git a/app/src/main/java/com/king/zxing/app/util/StatusBarUtils.java b/app/src/main/java/com/king/zxing/app/util/StatusBarUtils.java
index 0160be0..b103ccb 100644
--- a/app/src/main/java/com/king/zxing/app/util/StatusBarUtils.java
+++ b/app/src/main/java/com/king/zxing/app/util/StatusBarUtils.java
@@ -19,7 +19,6 @@ import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
-import android.support.annotation.ColorInt;
import android.support.annotation.FloatRange;
import android.support.v7.widget.Toolbar;
import android.view.View;
@@ -33,8 +32,7 @@ import com.king.zxing.app.R;
/**
* @author Jenly Jenly
*/
-public enum StatusBarUtils {
- INSTANCE;
+public class StatusBarUtils {
public static void immersiveStatusBar(Activity activity,Toolbar toolbar) {
immersiveStatusBar(activity,toolbar,0.0f);
@@ -80,7 +78,7 @@ public enum StatusBarUtils {
}
/** 获取状态栏高度 */
- public static int getStatusBarHeight(Context context) {
+ private static int getStatusBarHeight(Context context) {
return context.getResources().getDimensionPixelSize(R.dimen.status_bar_height);
}
}