Add require scrolling button for FingerprintEnrolling intro
The consent in the fingerprint introduction has been updated. Users are required to read through the content. Adding a scrolling button is to prevent directly going to next page from this page. It also makes sure the content has to be scrolled down to the bottom of page. Fix: 184591438 Test: visual verified 1) Prepare a device with fingerprint sensor 2) Settings > Security > Fingerprint unlock 3) Entering the enrollment flow and see if the introduction has a button named "More" on the right-bottom side. Change-Id: I1916293807ca9fb04f5d576cf4f6aaccbbe1ff00
This commit is contained in:
@@ -37,6 +37,7 @@ import com.android.settingslib.RestrictedLockUtilsInternal;
|
||||
import com.google.android.setupcompat.template.FooterBarMixin;
|
||||
import com.google.android.setupcompat.template.FooterButton;
|
||||
import com.google.android.setupdesign.span.LinkSpan;
|
||||
import com.google.android.setupdesign.template.RequireScrollMixin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -69,14 +70,18 @@ public class FingerprintEnrollIntroduction extends BiometricEnrollIntroduction {
|
||||
.build()
|
||||
);
|
||||
|
||||
mFooterBarMixin.setPrimaryButton(
|
||||
new FooterButton.Builder(this)
|
||||
final FooterButton nextButton = new FooterButton.Builder(this)
|
||||
.setText(R.string.security_settings_fingerprint_enroll_introduction_agree)
|
||||
.setListener(this::onNextButtonClick)
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(R.style.SudGlifButton_Primary)
|
||||
.build()
|
||||
);
|
||||
.build();
|
||||
|
||||
mFooterBarMixin.setPrimaryButton(nextButton);
|
||||
final RequireScrollMixin requireScrollMixin =
|
||||
getLayout().getMixin(RequireScrollMixin.class);
|
||||
requireScrollMixin.requireScrollWithButton(this, nextButton,
|
||||
R.string.security_settings_face_enroll_introduction_more, this::onNextButtonClick);
|
||||
}
|
||||
|
||||
int getNegativeButtonTextId() {
|
||||
|
Reference in New Issue
Block a user