File tree Expand file tree Collapse file tree
czxing/src/main/java/me/devilsen/czxing/view Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,8 +357,8 @@ private void moveScanLine() {
357357 @ Override
358358 public void onAnimationUpdate (ValueAnimator animation ) {
359359 mScanLinePosition = (float ) animation .getAnimatedValue ();
360- // postInvalidate();
361- postInvalidate (mBoxLeft ,
360+ // 这里如果用postInvalidate会导致所在Activity的onStop和onDestroy方法阻塞,感谢lhhseraph的反馈
361+ postInvalidateOnAnimation (mBoxLeft ,
362362 ((int ) (mBoxTop + mScanLinePosition - 10 )),
363363 mBoxLeft + mBoxSize ,
364364 ((int ) (mBoxTop + mScanLinePosition + SCAN_LINE_HEIGHT + 10 )));
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ android {
4747
4848dependencies {
4949
50- // implementation project(':czxing')
51- implementation ' me.devilsen:CZXing:0.8.9'
50+ implementation project(' :czxing' )
51+ // implementation 'me.devilsen:CZXing:0.8.9'
5252
5353 implementation rootProject. ext. appcompat
5454 testImplementation rootProject. ext. junit
You can’t perform that action at this time.
0 commit comments