Merge "Add skip button to fingerprint enrolling screen" into oc-dr1-dev am: 624212f43c

am: a3eb263479

Change-Id: Ibe7045461c17aaf3b761f746bac2a596b9e7e2a0
This commit is contained in:
Maurice Lam
2017-06-27 18:54:33 +00:00
committed by android-build-merger
4 changed files with 65 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
@@ -98,6 +99,10 @@ public class FingerprintEnrollEnrolling extends FingerprintEnrollBase
mRepeatMessage = (TextView) findViewById(R.id.repeat_message);
mErrorText = (TextView) findViewById(R.id.error_text);
mProgressBar = (ProgressBar) findViewById(R.id.fingerprint_progress_bar);
Button skipButton = findViewById(R.id.skip_button);
skipButton.setOnClickListener(this);
final LayerDrawable fingerprintDrawable = (LayerDrawable) mProgressBar.getBackground();
mIconAnimationDrawable = (AnimatedVectorDrawable)
fingerprintDrawable.findDrawableByLayerId(R.id.fingerprint_animation);
@@ -211,6 +216,18 @@ public class FingerprintEnrollEnrolling extends FingerprintEnrollBase
super.onBackPressed();
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.skip_button:
setResult(RESULT_SKIP);
finish();
break;
default:
super.onClick(v);
}
}
private void animateProgress(int progress) {
if (mProgressAnim != null) {
mProgressAnim.cancel();