InputSignInMethod

public final class InputSignInMethod
extends Object implements SignInTemplate.SignInMethod

java.lang.Object
   ↳ androidx.car.app.model.signin.InputSignInMethod


A SignInTemplate.SignInMethod that presents an input box for the user to enter their credentials.

For example, this can be used to request a username, a password or an activation code.

Summary

Nested classes

class InputSignInMethod.Builder

A builder of InputSignInMethod

interface InputSignInMethod.OnInputCompletedListener

A listener for handling text input completion event. 

Constants

int INPUT_TYPE_DEFAULT

Default input where the text is shown as it is typed.

int INPUT_TYPE_PASSWORD

Input where the text is hidden as it is typed.

int KEYBOARD_DEFAULT

Default (full) keyboard.

int KEYBOARD_EMAIL

Keyboard optimized for typing an email address.

int KEYBOARD_NUMBER

Keyboard optimized for typing numbers.

int KEYBOARD_PHONE

Keyboard optimized for typing a phone number.

Public methods

boolean equals(Object other)
CarText getDefaultValue()

Returns the default value for this input box or null if no value is provided.

int getInputType()

Returns the input type, one of INPUT_TYPE_DEFAULT or INPUT_TYPE_PASSWORD

int getKeyboardType()

Returns the type of keyboard to be displayed when this input gets focused.

CarText getMessage()

Returns a message associated with the user input.

OnInputCompletedDelegate getOnInputCompletedDelegate()

Returns the OnInputCompletedDelegate for input callbacks.

CarText getPrompt()

Returns the text explaining to the user what should be entered in this input box or null if no prompt is provided.

int hashCode()
boolean isShowKeyboardByDefault()

Returns whether to show the keyboard by default or not.

String toString()

Inherited methods

Constants

INPUT_TYPE_DEFAULT

public static final int INPUT_TYPE_DEFAULT

Default input where the text is shown as it is typed.

Constant Value: 1 (0x00000001)

INPUT_TYPE_PASSWORD

public static final int INPUT_TYPE_PASSWORD

Input where the text is hidden as it is typed.

Constant Value: 2 (0x00000002)

KEYBOARD_DEFAULT

public static final int KEYBOARD_DEFAULT

Default (full) keyboard.

Constant Value: 1 (0x00000001)

KEYBOARD_EMAIL

public static final int KEYBOARD_EMAIL

Keyboard optimized for typing an email address.

Constant Value: 2 (0x00000002)

KEYBOARD_NUMBER

public static final int KEYBOARD_NUMBER

Keyboard optimized for typing numbers.

Constant Value: 4 (0x00000004)

KEYBOARD_PHONE

public static final int KEYBOARD_PHONE

Keyboard optimized for typing a phone number.

Constant Value: 3 (0x00000003)

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getDefaultValue

public CarText getDefaultValue ()

Returns the default value for this input box or null if no value is provided.

For the INPUT_TYPE_PASSWORD input type, this value will formatted to be hidden to the user as well.

Returns
CarText

getInputType

public int getInputType ()

Returns the input type, one of INPUT_TYPE_DEFAULT or INPUT_TYPE_PASSWORD

Returns
int

getKeyboardType

public int getKeyboardType ()

Returns the type of keyboard to be displayed when this input gets focused.

Returns
int

getMessage

public CarText getMessage ()

Returns a message associated with the user input.

For example, this can be used to indicate formatting errors, wrong username or password, or any other situation related to the user input.

Returns
CarText

getOnInputCompletedDelegate

public OnInputCompletedDelegate getOnInputCompletedDelegate ()

Returns the OnInputCompletedDelegate for input callbacks.

Returns
OnInputCompletedDelegate

getPrompt

public CarText getPrompt ()

Returns the text explaining to the user what should be entered in this input box or null if no prompt is provided.

Returns
CarText

hashCode

public int hashCode ()

Returns
int

isShowKeyboardByDefault

public boolean isShowKeyboardByDefault ()

Returns whether to show the keyboard by default or not.

Returns
boolean

toString

public String toString ()

Returns
String