InputSignInMethod
@RequiresCarApi(value = 2)
@CarProtocol
class InputSignInMethod : 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 |
|---|
|
A builder of |
Constants |
|
|---|---|
const Int |
Default input where the text is shown as it is typed. |
const Int |
Input where the text is hidden as it is typed. |
const Int |
KEYBOARD_DEFAULT = 1Default (full) keyboard. |
const Int |
KEYBOARD_EMAIL = 2Keyboard optimized for typing an email address. |
const Int |
KEYBOARD_NUMBER = 4Keyboard optimized for typing numbers. |
const Int |
KEYBOARD_PHONE = 3Keyboard optimized for typing a phone number. |
Public functions |
|
|---|---|
Boolean |
|
CarText? |
Returns the default value for this input box or |
CarText? |
Returns an error message associated with the user input. |
CarText? |
getHint()Returns the text explaining to the user what should be entered in this input box or |
InputCallbackDelegate |
Returns the |
Int |
Returns the input type, one of |
Int |
Returns the type of keyboard to be displayed when this input gets focused. |
Int |
hashCode() |
Boolean |
Returns whether to show the keyboard by default or not. |
String |
toString() |
Constants
INPUT_TYPE_DEFAULT
const val INPUT_TYPE_DEFAULT = 1: Int
Default input where the text is shown as it is typed.
INPUT_TYPE_PASSWORD
const val INPUT_TYPE_PASSWORD = 2: Int
Input where the text is hidden as it is typed.
KEYBOARD_EMAIL
const val KEYBOARD_EMAIL = 2: Int
Keyboard optimized for typing an email address.
KEYBOARD_NUMBER
const val KEYBOARD_NUMBER = 4: Int
Keyboard optimized for typing numbers.
KEYBOARD_PHONE
const val KEYBOARD_PHONE = 3: Int
Keyboard optimized for typing a phone number.
Public functions
getDefaultValue
fun getDefaultValue(): CarText?
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
fun getErrorMessage(): CarText?
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
fun getHint(): CarText?
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
fun getInputCallbackDelegate(): InputCallbackDelegate
Returns the InputCallbackDelegate for input callbacks.
| See also | |
|---|---|
Builder |
getInputType
fun getInputType(): Int
Returns the input type, one of INPUT_TYPE_DEFAULT or INPUT_TYPE_PASSWORD
getKeyboardType
fun getKeyboardType(): Int
Returns the type of keyboard to be displayed when this input gets focused.
| See also | |
|---|---|
setKeyboardType |
isShowKeyboardByDefault
fun isShowKeyboardByDefault(): Boolean
Returns whether to show the keyboard by default or not.
| See also | |
|---|---|
setShowKeyboardByDefault |