Created
September 10, 2020 04:31
-
-
Save husaynhakeem/69dee3cdf607e8d82a10aaff4b35451c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val builder = PromptInfo.Builder() | |
| .setTitle(/* Title */) | |
| .setSubtitle(/* Subtitle */) | |
| .setDescription(/* Description */) | |
| // Set a negative button. It would typically display "Cancel" | |
| builder.setNegativeButtonText(/* Negative button label. E.g. "Cancel" */) | |
| // Show a confirmation button after authentication succeeds | |
| // Useful for certain operations, e.g. Ones that involve payment | |
| builder.setConfirmationRequired(/* True/False */) | |
| // Allow authentication with a password, pin or pattern | |
| builder.setDeviceCredentialAllowed(/* True/False */) | |
| val promptInfo = try { | |
| builder.build() | |
| } catch (exception: IllegalArgumentException) { | |
| // Failed to build a prompt info instance | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment