SemanticsPropertyKey

Class

Android
class SemanticsPropertyKey<T>(
    /** The name of the property. Should be the same as the constant from shich it is accessed. */
    val name: String,
    internal val mergePolicy: (T?, T) -> T? = { parentValue, childValue ->
        parentValue ?: childValue
    }
)

SemanticsPropertyKey is the infrastructure for setting key/value pairs inside semantics block in a type-safe way. Each key has one particular statically defined value type T.

Functions

fun merge(parentValue: T?, childValue: T): T?