Fix alignment of finger animation with progress bar

Makes progress bar opaque and fixes color codes accordingly, and adjusts
values to shift finger animation and progress bar for proper alignment

Test: Enroll finger in light and dark theme and observe alignment of
finger with progress bar
Fixes: 245819077
Change-Id: I26bea8e1870f08b413a4ec2a9e6e83015facd004
Merged-In: I26bea8e1870f08b413a4ec2a9e6e83015facd004
This commit is contained in:
Grace Cheng
2022-09-16 17:13:18 +00:00
parent 74a748ece8
commit 76902f4b7c
5 changed files with 15 additions and 6 deletions

View File

@@ -316,6 +316,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
mFastOutLinearInInterpolator = AnimationUtils.loadInterpolator(
this, android.R.interpolator.fast_out_linear_in);
if (mProgressBar != null) {
mProgressBar.setProgressBackgroundTintMode(PorterDuff.Mode.SRC);
mProgressBar.setOnTouchListener((v, event) -> {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
mIconTouchCount++;
@@ -889,7 +890,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
ColorStateList fillColor = ColorStateList.valueOf(
isError ? error_color : progress_bar_fill_color);
mProgressBar.setProgressTintList(fillColor);
mProgressBar.setProgressTintMode(PorterDuff.Mode.SRC_ATOP);
mProgressBar.setProgressTintMode(PorterDuff.Mode.SRC);
mProgressBar.invalidate();
}
}