duplicateParentState

open fun duplicateParentState(duplicateParentState: Boolean): T

If true, component duplicates its drawable state (focused, pressed, etc.) from the direct parent.

In the following example, when Row gets pressed state, its child OtherStatefulDrawable will get that pressed state within itself too:


Row.create(c)
    .drawable(stateListDrawable)
    .clickable(true)
    .child(
        OtherStatefulDrawable.create(c)
            .duplicateParentState(true))

See also