Merge "Show "no thanks" button when scroll is not needed." into main

This commit is contained in:
Hao Dong
2024-04-04 18:17:35 +00:00
committed by Android (Google) Code Review
3 changed files with 99 additions and 23 deletions

View File

@@ -229,13 +229,15 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
}
// Show secondary button once scroll is completed.
if (!scrollNeeded) {
if (!enrollmentCompleted) {
getSecondaryFooterButton().setVisibility(View.VISIBLE);
}
mHasScrolledToBottom = true;
}
getSecondaryFooterButton().setVisibility(
!scrollNeeded && !enrollmentCompleted ? View.VISIBLE : View.INVISIBLE);
mHasScrolledToBottom = !scrollNeeded;
});
final boolean isScrollNeeded = requireScrollMixin.isScrollingRequired();
final boolean enrollmentCompleted = checkMaxEnrolled() != 0;
getSecondaryFooterButton().setVisibility(
!isScrollNeeded && !enrollmentCompleted ? View.VISIBLE : View.INVISIBLE);
}
@Override