FillableData
-
Cmn
interface FillableData
Represents a single piece of data for autofill purposes.
An instance of FillableData is expected to hold a value of a single specific type. Consumers can use the corresponding property to retrieve the value. For any given instance, only the property that matches the underlying data's type will return a non-null value. All other properties will return null.
Summary
Nested types |
|---|
object FillableData.Companion |
Public functions |
||
|---|---|---|
open Long |
getDateMillisOrDefault(defaultValue: Long)Returns the date in milliseconds value if it is available, otherwise returns the |
Cmn
|
open Int |
getListIndexOrDefault(defaultValue: Int)Returns the list index value if it is available, otherwise returns the |
Cmn
|
Public properties |
||
|---|---|---|
open Boolean? |
The |
Cmn
|
open Long? |
The date in milliseconds since epoch, or |
Cmn
|
open Int? |
The |
Cmn
|
open CharSequence? |
The |
Cmn
|
Extension functions |
||
|---|---|---|
AutofillValue? |
Retrieves the underlying platform |
android
|
Public functions
getDateMillisOrDefault
open fun getDateMillisOrDefault(defaultValue: Long): Long
Returns the date in milliseconds value if it is available, otherwise returns the defaultValue.
getListIndexOrDefault
open fun getListIndexOrDefault(defaultValue: Int): Int
Returns the list index value if it is available, otherwise returns the defaultValue.
Public properties
booleanValue
open val booleanValue: Boolean?
The Boolean representation of the data, or null if none is available.
dateMillisValue
open val dateMillisValue: Long?
The date in milliseconds since epoch, or null if none is available.
listIndexValue
open val listIndexValue: Int?
The Int (integer) representation of the data, or null if none is available.
textValue
open val textValue: CharSequence?
The CharSequence (text) representation of the data, or null if none is available.
Extension functions
FillableData.toAutofillValue
fun FillableData.toAutofillValue(): AutofillValue?
Retrieves the underlying platform AutofillValue from the FillableData.
| Returns | |
|---|---|
AutofillValue? |
The platform |