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:
@@ -43,30 +43,32 @@
|
|||||||
android:id="@+id/illustration_lottie"
|
android:id="@+id/illustration_lottie"
|
||||||
android:layout_width="@dimen/fingerprint_progress_bar_max_size"
|
android:layout_width="@dimen/fingerprint_progress_bar_max_size"
|
||||||
android:layout_height="@dimen/fingerprint_progress_bar_max_size"
|
android:layout_height="@dimen/fingerprint_progress_bar_max_size"
|
||||||
android:layout_marginTop="@dimen/udfps_lottie_translate_y"
|
android:layout_marginRight="@dimen/sfps_lottie_translate_x"
|
||||||
|
android:layout_marginBottom="@dimen/sfps_lottie_translate_y"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:lottie_autoPlay="true"
|
app:lottie_autoPlay="true"
|
||||||
app:lottie_loop="true"
|
app:lottie_loop="true"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
app:lottie_speed=".85"
|
app:lottie_speed=".85" />
|
||||||
android:layout_marginVertical="24dp" />
|
|
||||||
|
|
||||||
<com.google.android.setupdesign.view.FillContentLayout
|
<com.google.android.setupdesign.view.FillContentLayout
|
||||||
android:layout_width="@dimen/fingerprint_progress_bar_max_size"
|
android:layout_width="@dimen/fingerprint_progress_bar_max_size"
|
||||||
android:layout_height="@dimen/fingerprint_progress_bar_max_size"
|
android:layout_height="@dimen/fingerprint_progress_bar_max_size"
|
||||||
android:paddingTop="0dp"
|
android:paddingTop="0dp"
|
||||||
android:paddingBottom="0dp"
|
android:paddingBottom="0dp">
|
||||||
android:layout_marginVertical="24dp">
|
|
||||||
|
|
||||||
<com.android.settings.widget.RingProgressBar
|
<com.android.settings.widget.RingProgressBar
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/fingerprint_progress_bar"
|
android:id="@+id/fingerprint_progress_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="@dimen/sfps_progress_bar_translate_x"
|
||||||
|
android:layout_marginTop="@dimen/sfps_progress_bar_translate_y"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:minHeight="@dimen/fingerprint_progress_bar_min_size"
|
android:minHeight="@dimen/fingerprint_progress_bar_min_size"
|
||||||
|
android:progressBackgroundTint="@color/sfps_enrollment_progress_bar_bg_color"
|
||||||
android:progress="0" />
|
android:progress="0" />
|
||||||
</com.google.android.setupdesign.view.FillContentLayout>
|
</com.google.android.setupdesign.view.FillContentLayout>
|
||||||
|
|
||||||
|
@@ -53,6 +53,7 @@
|
|||||||
<!-- Side fingerprint sensor enrollment animation colors -->
|
<!-- Side fingerprint sensor enrollment animation colors -->
|
||||||
<color name="sfps_enrollment_fp_captured_color">#d2e3fc</color> <!-- Blue 100 -->
|
<color name="sfps_enrollment_fp_captured_color">#d2e3fc</color> <!-- Blue 100 -->
|
||||||
<color name="sfps_enrollment_fp_error_color">#fad2cf</color> <!-- Red 100 -->
|
<color name="sfps_enrollment_fp_error_color">#fad2cf</color> <!-- Red 100 -->
|
||||||
|
<color name="sfps_enrollment_progress_bar_bg_color">#3C4043</color> <!-- Gray 800 -->
|
||||||
<color name="sfps_enrollment_progress_bar_fill_color">#669df6</color> <!-- Blue 400 -->
|
<color name="sfps_enrollment_progress_bar_fill_color">#669df6</color> <!-- Blue 400 -->
|
||||||
<color name="sfps_enrollment_progress_bar_error_color">#ee675c</color> <!-- Red 400 -->
|
<color name="sfps_enrollment_progress_bar_error_color">#ee675c</color> <!-- Red 400 -->
|
||||||
|
|
||||||
|
@@ -204,6 +204,7 @@
|
|||||||
<!-- Side fingerprint sensor guided enrollment fill colors -->
|
<!-- Side fingerprint sensor guided enrollment fill colors -->
|
||||||
<color name="sfps_enrollment_fp_captured_color">#d2e3fc</color> <!-- Blue 100 -->
|
<color name="sfps_enrollment_fp_captured_color">#d2e3fc</color> <!-- Blue 100 -->
|
||||||
<color name="sfps_enrollment_fp_error_color">#fad2cf</color> <!-- Red 100 -->
|
<color name="sfps_enrollment_fp_error_color">#fad2cf</color> <!-- Red 100 -->
|
||||||
|
<color name="sfps_enrollment_progress_bar_bg_color">#E8EAED</color> <!-- Gray 200 -->
|
||||||
<color name="sfps_enrollment_progress_bar_fill_color">#1a73e8</color> <!-- Blue 600 -->
|
<color name="sfps_enrollment_progress_bar_fill_color">#1a73e8</color> <!-- Blue 600 -->
|
||||||
<color name="sfps_enrollment_progress_bar_error_color">#d93025</color> <!-- Red 600 -->
|
<color name="sfps_enrollment_progress_bar_error_color">#d93025</color> <!-- Red 600 -->
|
||||||
|
|
||||||
|
@@ -230,6 +230,10 @@
|
|||||||
fingerprint_finish_max_size = fingerprint_progress_bar_max_size
|
fingerprint_finish_max_size = fingerprint_progress_bar_max_size
|
||||||
+ (fingerprint_enrolling_content_margin_vertical x 2) -->
|
+ (fingerprint_enrolling_content_margin_vertical x 2) -->
|
||||||
<dimen name="fingerprint_finish_max_size">288dp</dimen>
|
<dimen name="fingerprint_finish_max_size">288dp</dimen>
|
||||||
|
<dimen name="sfps_progress_bar_translate_x">2dp</dimen>
|
||||||
|
<dimen name="sfps_progress_bar_translate_y">2dp</dimen>
|
||||||
|
<dimen name="sfps_lottie_translate_x">12dp</dimen>
|
||||||
|
<dimen name="sfps_lottie_translate_y">12dp</dimen>
|
||||||
<dimen name="udfps_lottie_translate_y">0dp</dimen>
|
<dimen name="udfps_lottie_translate_y">0dp</dimen>
|
||||||
|
|
||||||
<!-- Face -->
|
<!-- Face -->
|
||||||
|
@@ -316,6 +316,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
|||||||
mFastOutLinearInInterpolator = AnimationUtils.loadInterpolator(
|
mFastOutLinearInInterpolator = AnimationUtils.loadInterpolator(
|
||||||
this, android.R.interpolator.fast_out_linear_in);
|
this, android.R.interpolator.fast_out_linear_in);
|
||||||
if (mProgressBar != null) {
|
if (mProgressBar != null) {
|
||||||
|
mProgressBar.setProgressBackgroundTintMode(PorterDuff.Mode.SRC);
|
||||||
mProgressBar.setOnTouchListener((v, event) -> {
|
mProgressBar.setOnTouchListener((v, event) -> {
|
||||||
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||||
mIconTouchCount++;
|
mIconTouchCount++;
|
||||||
@@ -889,7 +890,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
|||||||
ColorStateList fillColor = ColorStateList.valueOf(
|
ColorStateList fillColor = ColorStateList.valueOf(
|
||||||
isError ? error_color : progress_bar_fill_color);
|
isError ? error_color : progress_bar_fill_color);
|
||||||
mProgressBar.setProgressTintList(fillColor);
|
mProgressBar.setProgressTintList(fillColor);
|
||||||
mProgressBar.setProgressTintMode(PorterDuff.Mode.SRC_ATOP);
|
mProgressBar.setProgressTintMode(PorterDuff.Mode.SRC);
|
||||||
mProgressBar.invalidate();
|
mProgressBar.invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user