PromptContentViewWithMoreOptionsButton.Builder


public static final class PromptContentViewWithMoreOptionsButton.Builder
extends Object

java.lang.Object
   ↳ android.hardware.biometrics.PromptContentViewWithMoreOptionsButton.Builder


A builder that collects arguments to be shown on the content view with more options button.

Summary

Public constructors

Builder()

Public methods

PromptContentViewWithMoreOptionsButton build()

Creates a PromptContentViewWithMoreOptionsButton.

PromptContentViewWithMoreOptionsButton.Builder setDescription(String description)

Optional: Sets a description that will be shown on the content view.

PromptContentViewWithMoreOptionsButton.Builder setMoreOptionsButtonListener(Executor executor, DialogInterface.OnClickListener listener)

Required: Sets the executor and click listener for the more options button on the prompt content.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

Added in API level 35
public PromptContentViewWithMoreOptionsButton build ()

Creates a PromptContentViewWithMoreOptionsButton.
Requires Manifest.permission.SET_BIOMETRIC_DIALOG_ADVANCED

Returns
PromptContentViewWithMoreOptionsButton An instance of PromptContentViewWithMoreOptionsButton. This value cannot be null.

Throws
IllegalArgumentException If the executor of more options button is null, or the listener of more options button is null.

setDescription

Added in API level 35
public PromptContentViewWithMoreOptionsButton.Builder setDescription (String description)

Optional: Sets a description that will be shown on the content view.
Requires Manifest.permission.SET_BIOMETRIC_DIALOG_ADVANCED

Parameters
description String: The description to display. This value cannot be null.

Returns
PromptContentViewWithMoreOptionsButton.Builder This builder. This value cannot be null.

Throws
IllegalArgumentException If description exceeds certain character limit.

setMoreOptionsButtonListener

Added in API level 35
public PromptContentViewWithMoreOptionsButton.Builder setMoreOptionsButtonListener (Executor executor, 
                DialogInterface.OnClickListener listener)

Required: Sets the executor and click listener for the more options button on the prompt content.
Requires Manifest.permission.SET_BIOMETRIC_DIALOG_ADVANCED

Parameters
executor Executor: 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 DialogInterface.OnClickListener: Listener containing a callback to be run when the button is pressed. This value cannot be null.

Returns
PromptContentViewWithMoreOptionsButton.Builder This builder. This value cannot be null.