VisibilityKt
public final class VisibilityKt
Summary
Public methods |
|
|---|---|
static final @NonNull LayoutModifier |
@RequiresSchemaVersion(major = 1, minor = 300)Adds a modifier to specify the visibility of the element. |
Public methods
visibility
@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 |
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). |