android-components / mozilla.components.concept.engine.prompt / Choice

Choice

data class Choice (source)

Value type that represents a select option, optgroup or menuitem html element.

Constructors

Name Summary
<init> Choice(id: String, enable: Boolean = true, label: String, selected: Boolean = false, isASeparator: Boolean = false, children: Array<Choice>? = null)
Value type that represents a select option, optgroup or menuitem html element.

Properties

Name Summary
children val children: Array<Choice>?
Sub-items in a group, or null if not a group.
enable var enable: Boolean
indicate if item should be selectable or not.
id val id: String
of the option, optgroup or menuitem.
isASeparator val isASeparator: Boolean
Indicating if the item should be a menu separator (only valid for menus).
isGroupType val isGroupType: Boolean
label var label: String
The label for displaying the option, optgroup or menuitem.
selected var selected: Boolean
Indicate if the item should be pre-selected.

Functions

Name Summary
describeContents fun describeContents(): Int
writeToParcel fun writeToParcel(parcel: <ERROR CLASS>, flags: Int): Unit

Companion Object Functions

Name Summary
createFromParcel fun createFromParcel(parcel: <ERROR CLASS>): Choice
newArray fun newArray(size: Int): Array<Choice?>

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.