SemanticsPropertyKey

open class SemanticsPropertyKey<T> : ReadWriteProperty<SemanticsPropertyReceiver, T>
kotlin.Any
   ↳ androidx.ui.semantics.SemanticsPropertyKey

Summary

Public constructors

<init>(name: String)

Public methods

T
getValue(thisRef: SemanticsPropertyReceiver, property: KProperty<*>)

Throws UnsupportedOperationException.

open T
merge(existingValue: T, newValue: T)

Subclasses that wish to implement merging should override this to output the merged value

Unit
setValue(thisRef: SemanticsPropertyReceiver, property: KProperty<*>, value: T)

Properties

String

The name of the property.

Public constructors

<init>

SemanticsPropertyKey(name: String)

Public methods

getValue

fun getValue(
    thisRef: SemanticsPropertyReceiver,
    property: KProperty<*>
): T

Throws UnsupportedOperationException. Should not be called.

merge

open fun merge(
    existingValue: T,
    newValue: T
): T

Subclasses that wish to implement merging should override this to output the merged value

This implementation always throws IllegalStateException. It should be overridden for properties that can be merged.

setValue

fun setValue(
    thisRef: SemanticsPropertyReceiver,
    property: KProperty<*>,
    value: T
): Unit

Properties

name

val name: String

The name of the property. Should be the same as the constant from which it is accessed.