Basic Authentication Screen¶
Introduction¶
This screen supports basic authentication, where a user inputs their user name and password. The user name input field has the ability to show error messages as shown in the following animation.
Examples¶
val css = BasicAuthenticationScreenSettings.Builder()
.setInstruction("Instruction")
.setTitle("Title")
.setOkButtonText("GO")
.build()
val screen = BasicAuthenticationScreen(getTargetContext())
screen.initialize(css)
screen.setOkButtonClickListener {
//do authentication.
if(inValid) {
screen.showValidationError("Error")
} else {
//good to go.
}
}
BasicAuthenticationScreenSettings css = new BasicAuthenticationScreenSettings.Builder()
.setInstruction("Instruction")
.setTitle("Title")
.setOkButtonText("GO")
.build();
BasicAuthenticationScreen screen = new BasicAuthenticationScreen(getTargetContext());
screen.initialize(css);
screen.setOkButtonClickListener(v -> {
//do authentication.
if(inValid) {
screen.showValidationError("Error");
} else {
//good to go.
}
});
Last update: May 11, 2021