diff --git a/.idea/misc.xml b/.idea/misc.xml index 635999d..ba7052b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -24,7 +24,7 @@ - + diff --git a/libraryzxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java b/libraryzxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java index 0513922..7ba3499 100755 --- a/libraryzxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java +++ b/libraryzxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java @@ -328,24 +328,26 @@ private void finishFailed(String errorMsg) { intent.putExtra(MNScanManager.INTENT_KEY_RESULT_ERROR, errorMsg); this.setResult(MNScanManager.RESULT_FAIL, intent); this.finish(); - //关闭窗体动画显示 - this.overridePendingTransition(R.anim.mn_scan_activity_bottom_out, 0); + finishFinal(); } private void finishCancle() { this.setResult(MNScanManager.RESULT_CANCLE, null); - this.finish(); - //关闭窗体动画显示 - this.overridePendingTransition(R.anim.mn_scan_activity_bottom_out, 0); + finishFinal(); } private void finishSuccess(String result) { Intent intent = new Intent(); intent.putExtra(MNScanManager.INTENT_KEY_RESULT_SUCCESS, result); this.setResult(MNScanManager.RESULT_SUCCESS, intent); + finishFinal(); + } + + private void finishFinal(){ this.finish(); //关闭窗体动画显示 - this.overridePendingTransition(R.anim.mn_scan_activity_bottom_out, 0); + overridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out); +// this.overridePendingTransition(R.anim.mn_scan_activity_bottom_out, android.R.anim.fade_in); } @Override diff --git a/libraryzxing/src/main/java/com/google/zxing/client/android/MNScanManager.java b/libraryzxing/src/main/java/com/google/zxing/client/android/MNScanManager.java index 711c659..f7bf4c7 100644 --- a/libraryzxing/src/main/java/com/google/zxing/client/android/MNScanManager.java +++ b/libraryzxing/src/main/java/com/google/zxing/client/android/MNScanManager.java @@ -34,7 +34,7 @@ public static void startScan(Activity activity, MNScanCallback scanCallback) { Intent intent = new Intent(activity.getApplicationContext(), CaptureActivity.class); ActResultRequest actResultRequest = new ActResultRequest(activity); actResultRequest.startForResult(intent, scanCallback); - activity.overridePendingTransition(R.anim.mn_scan_activity_bottom_in, 0); + activity.overridePendingTransition(R.anim.mn_scan_activity_bottom_in, R.anim.mn_scan_activity_no_anim); } public static void startScan(Activity activity, MNScanConfig mnScanConfig, MNScanCallback scanCallback) { @@ -55,7 +55,7 @@ public static void startScan(Activity activity, MNScanConfig mnScanConfig, MNSca ActResultRequest actResultRequest = new ActResultRequest(activity); actResultRequest.startForResult(intent, scanCallback); - activity.overridePendingTransition(mnScanConfig.getActivityOpenAnime(), 0); + activity.overridePendingTransition(mnScanConfig.getActivityOpenAnime(), R.anim.mn_scan_activity_no_anim); } } diff --git a/libraryzxing/src/main/res/anim/mn_scan_activity_bottom_in.xml b/libraryzxing/src/main/res/anim/mn_scan_activity_bottom_in.xml index 3831c8e..8db8d18 100644 --- a/libraryzxing/src/main/res/anim/mn_scan_activity_bottom_in.xml +++ b/libraryzxing/src/main/res/anim/mn_scan_activity_bottom_in.xml @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/libraryzxing/src/main/res/anim/mn_scan_activity_bottom_out.xml b/libraryzxing/src/main/res/anim/mn_scan_activity_bottom_out.xml index 78d12d9..245985e 100644 --- a/libraryzxing/src/main/res/anim/mn_scan_activity_bottom_out.xml +++ b/libraryzxing/src/main/res/anim/mn_scan_activity_bottom_out.xml @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/libraryzxing/src/main/res/anim/mn_scan_activity_no_anim.xml b/libraryzxing/src/main/res/anim/mn_scan_activity_no_anim.xml new file mode 100644 index 0000000..bb5ad07 --- /dev/null +++ b/libraryzxing/src/main/res/anim/mn_scan_activity_no_anim.xml @@ -0,0 +1,3 @@ + + \ No newline at end of file diff --git a/libraryzxing/src/main/res/values/styles.xml b/libraryzxing/src/main/res/values/styles.xml index 4205dcb..59966db 100755 --- a/libraryzxing/src/main/res/values/styles.xml +++ b/libraryzxing/src/main/res/values/styles.xml @@ -45,7 +45,6 @@