InputSignInMethod


@RequiresCarApi(value = 2)
@CarProtocol
public final class InputSignInMethod implements SignInTemplate.SignInMethod


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 types

public final class InputSignInMethod.Builder

A builder of InputSignInMethod.

Constants

static final int

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

static final int

Input where the text is hidden as it is typed.

static final int

Default (full) keyboard.

static final int

Keyboard optimized for typing an email address.

static final int

Keyboard optimized for typing numbers.

static final int

Keyboard optimized for typing a phone number.

Public methods

boolean
equals(Object other)
@Nullable CarText

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

@Nullable CarText

Returns an error message associated with the user input.

@Nullable CarText

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

@NonNull InputCallbackDelegate

Returns the InputCallbackDelegate for input callbacks.

int

Returns the input type, one of INPUT_TYPE_DEFAULT or INPUT_TYPE_PASSWORD

int

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

int
boolean

Returns whether to show the keyboard by default or not.

@NonNull String

Constants

INPUT_TYPE_DEFAULT

Added in 1.0.0
public static final int INPUT_TYPE_DEFAULT = 1

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

INPUT_TYPE_PASSWORD

Added in 1.0.0
public static final int INPUT_TYPE_PASSWORD = 2

Input where the text is hidden as it is typed.

KEYBOARD_DEFAULT

Added in 1.0.0
public static final int KEYBOARD_DEFAULT = 1

Default (full) keyboard.

KEYBOARD_EMAIL

Added in 1.0.0
public static final int KEYBOARD_EMAIL = 2

Keyboard optimized for typing an email address.

KEYBOARD_NUMBER

Added in 1.0.0
public static final int KEYBOARD_NUMBER = 4

Keyboard optimized for typing numbers.

KEYBOARD_PHONE

Added in 1.0.0
public static final int KEYBOARD_PHONE = 3

Keyboard optimized for typing a phone number.

Public methods

equals

public boolean equals(Object other)

getDefaultValue

Added in 1.0.0
public @Nullable 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.

See also
setDefaultValue

getErrorMessage

Added in 1.1.0
public @Nullable CarText getErrorMessage()

Returns an error message associated with the user input.

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

See also
setErrorMessage

getHint

Added in 1.1.0
public @Nullable CarText getHint()

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

See also
setHint

getInputCallbackDelegate

Added in 1.1.0
public @NonNull InputCallbackDelegate getInputCallbackDelegate()

Returns the InputCallbackDelegate for input callbacks.

See also
Builder

getInputType

Added in 1.0.0
public int getInputType()

Returns the input type, one of INPUT_TYPE_DEFAULT or INPUT_TYPE_PASSWORD

getKeyboardType

Added in 1.0.0
public int getKeyboardType()

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

See also
setKeyboardType

hashCode

public int hashCode()

isShowKeyboardByDefault

Added in 1.0.0
public boolean isShowKeyboardByDefault()

Returns whether to show the keyboard by default or not.

toString

public @NonNull String toString()