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

Choice

data class Choice : Parcelable (source)

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

Types

CREATOR

companion object CREATOR : Creator<Choice>

Constructors

<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

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

describeContents

fun describeContents(): Int

writeToParcel

fun writeToParcel(parcel: Parcel, flags: Int): Unit

Companion Object Functions

createFromParcel

fun createFromParcel(parcel: Parcel): Choice

newArray

fun newArray(size: Int): Array<Choice?>