View.DuplicateParentStateEnabled Property

Definition

Indicates whether this duplicates its drawable state from its parent. -or- Enables or disables the duplication of the parent's state into this view.

public virtual bool DuplicateParentStateEnabled { [Android.Runtime.Register("isDuplicateParentStateEnabled", "()Z", "GetIsDuplicateParentStateEnabledHandler")] get; [Android.Runtime.Register("setDuplicateParentStateEnabled", "(Z)V", "GetSetDuplicateParentStateEnabled_ZHandler")] set; }
[<get: Android.Runtime.Register("isDuplicateParentStateEnabled", "()Z", "GetIsDuplicateParentStateEnabledHandler")>]
[<set: Android.Runtime.Register("setDuplicateParentStateEnabled", "(Z)V", "GetSetDuplicateParentStateEnabled_ZHandler")>]
member this.DuplicateParentStateEnabled : bool with get, set

Property Value

True if this view's drawable state is duplicated from the parent, false otherwise

Attributes

Remarks

Property getter documentation:

Indicates whether this duplicates its drawable state from its parent.

Java documentation for android.view.View.isDuplicateParentStateEnabled().

Property setter documentation:

Enables or disables the duplication of the parent's state into this view. When duplication is enabled, this view gets its drawable state from its parent rather than from its own internal properties.

Note: in the current implementation, setting this property to true after the view was added to a ViewGroup might have no effect at all. This property should always be used from XML or set to true before adding this view to a ViewGroup.

Note: if this view's parent addStateFromChildren property is enabled and this property is enabled, an exception will be thrown.

Note: if the child view uses and updates additional states which are unknown to the parent, these states should not be affected by this method.

Java documentation for android.view.View.setDuplicateParentStateEnabled(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also