EmbeddedBiometricPrompt.Builder.SetNegativeButton Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| SetNegativeButton(ICharSequence, IExecutor, IDialogInterfaceOnClickListener) |
Optional: Sets the text, executor, and click listener for the negative button on the prompt. |
| SetNegativeButton(String, IExecutor, IDialogInterfaceOnClickListener) |
SetNegativeButton(ICharSequence, IExecutor, IDialogInterfaceOnClickListener)
Optional: Sets the text, executor, and click listener for the negative button on the prompt.
[Android.Runtime.Register("setNegativeButton", "(Ljava/lang/CharSequence;Ljava/util/concurrent/Executor;Landroid/content/DialogInterface$OnClickListener;)Landroid/hardware/biometrics/EmbeddedBiometricPrompt$Builder;", "", ApiSince=37)]
public Android.Hardware.Biometrics.EmbeddedBiometricPrompt.Builder SetNegativeButton(Java.Lang.ICharSequence text, Java.Util.Concurrent.IExecutor executor, Android.Content.IDialogInterfaceOnClickListener listener);
[<Android.Runtime.Register("setNegativeButton", "(Ljava/lang/CharSequence;Ljava/util/concurrent/Executor;Landroid/content/DialogInterface$OnClickListener;)Landroid/hardware/biometrics/EmbeddedBiometricPrompt$Builder;", "", ApiSince=37)>]
member this.SetNegativeButton : Java.Lang.ICharSequence * Java.Util.Concurrent.IExecutor * Android.Content.IDialogInterfaceOnClickListener -> Android.Hardware.Biometrics.EmbeddedBiometricPrompt.Builder
Parameters
- text
- ICharSequence
Text to be shown on the negative button for the prompt. This value cannot be null.
- executor
- IExecutor
Executor that will be used to run the on click callback. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.
- listener
- IDialogInterfaceOnClickListener
Listener containing a callback to be run when the button is pressed. This value cannot be null.
Returns
This builder. This value cannot be null.
- Attributes
Remarks
Optional: Sets the text, executor, and click listener for the negative button on the prompt. This is typically a cancel button, but may be also used to show an alternative method for authentication, such as a screen that asks for a backup password.
If not provided and no fallback is added through addFallbackOption(CharSequence,int,Executor,DialogInterface.OnClickListener) (API 36.1 and later), the option to use device credential will be shown as the negative button if allowed in setAllowedAuthenticators(int). If credential is not allowed, "Cancel" will be shown as the negative button.
In API 36 and earlier, this setting is required. Note that this setting is not required, and in fact is explicitly disallowed, if device credential authentication is enabled via setAllowedAuthenticators(int). To use credential authentication and provide custom behavior, use addFallbackOption(CharSequence,int,Executor,DialogInterface.OnClickListener)
Android reference for android.hardware.biometrics.EmbeddedBiometricPrompt.Builder.setNegativeButton.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
SetNegativeButton(String, IExecutor, IDialogInterfaceOnClickListener)
public Android.Hardware.Biometrics.EmbeddedBiometricPrompt.Builder SetNegativeButton(string text, Java.Util.Concurrent.IExecutor executor, Android.Content.IDialogInterfaceOnClickListener listener);
member this.SetNegativeButton : string * Java.Util.Concurrent.IExecutor * Android.Content.IDialogInterfaceOnClickListener -> Android.Hardware.Biometrics.EmbeddedBiometricPrompt.Builder
Parameters
- text
- String
- executor
- IExecutor
- listener
- IDialogInterfaceOnClickListener