Builder


class Builder
kotlin.Any
   ↳ android.hardware.biometrics.PromptContentViewWithMoreOptionsButton.Builder

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

Summary

Public constructors

Public methods
PromptContentViewWithMoreOptionsButton

Creates a PromptContentViewWithMoreOptionsButton.

PromptContentViewWithMoreOptionsButton.Builder
setDescription(description: String)

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

PromptContentViewWithMoreOptionsButton.Builder

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

Public constructors

Builder

Builder()

Public methods

build

fun build(): PromptContentViewWithMoreOptionsButton

Creates a PromptContentViewWithMoreOptionsButton.
Requires android.Manifest.permission#SET_BIOMETRIC_DIALOG_ADVANCED

Return
PromptContentViewWithMoreOptionsButton An instance of PromptContentViewWithMoreOptionsButton. This value cannot be null.
Exceptions
java.lang.IllegalArgumentException If the executor of more options button is null, or the listener of more options button is null.

setDescription

fun setDescription(description: String): PromptContentViewWithMoreOptionsButton.Builder

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

Parameters
description String: The description to display. This value cannot be null.
Return
PromptContentViewWithMoreOptionsButton.Builder This builder. This value cannot be null.
Exceptions
java.lang.IllegalArgumentException If description exceeds certain character limit.

setMoreOptionsButtonListener

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

Required: Sets the executor and click listener for the more options button on the prompt content.
Requires android.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.
Return
PromptContentViewWithMoreOptionsButton.Builder This builder. This value cannot be null.