Fix the animation in the “How to set up Face Unlock” page can’t
be paused or hidden. Handling the Lottie onClick event to pause/resume the animation. Flag: EXEMPT bug-fix Bug: 378585895 Test: local build and verify to pause / resume lottie animation. Change-Id: I36ff303dcdb994fb5ad9d90957d9a3e8534c3634
This commit is contained in:
@@ -128,6 +128,16 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
||||
mIllustrationLottie.setAnimation(R.raw.face_education_lottie);
|
||||
mIllustrationLottie.setVisibility(View.VISIBLE);
|
||||
mIllustrationLottie.playAnimation();
|
||||
mIllustrationLottie.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (mIllustrationLottie.isAnimating()) {
|
||||
mIllustrationLottie.pauseAnimation();
|
||||
} else {
|
||||
mIllustrationLottie.resumeAnimation();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);
|
||||
|
Reference in New Issue
Block a user