VisibilityKt

Added in 1.3.0-alpha07

public final class VisibilityKt


Summary

Public methods

static final @NonNull LayoutModifier
@RequiresSchemaVersion(major = 1, minor = 300)
@ProtoLayoutExperimental
visibility(
    @NonNull LayoutModifier receiver,
    boolean staticVisibility,
    DynamicBuilders.DynamicBool dynamicVisibility
)

Adds a modifier to specify the visibility of the element.

Public methods

@RequiresSchemaVersion(major = 1, minor = 300)
@ProtoLayoutExperimental
public static final @NonNull LayoutModifier visibility(
    @NonNull LayoutModifier receiver,
    boolean staticVisibility,
    DynamicBuilders.DynamicBool dynamicVisibility
)

Adds a modifier to specify the visibility of the element. A hidden element still consume space in the layout, but will not render any contents, nor will any of its children render any contents.

Note that hidden elements won't receive input events.

Parameters
boolean staticVisibility

The static value for visibility. This value will be used if dynamicVisibility is null, or if can't be resolved.

DynamicBuilders.DynamicBool dynamicVisibility

The dynamic value for visibility. This can be used to change the visibility of the element dynamically (without changing the layout definition).