DimensionBuilders.HorizontalLayoutConstraint.Builder


public final class DimensionBuilders.HorizontalLayoutConstraint.Builder extends DimensionBuilders.DpPropLayoutConstraint.Builder


Builder for HorizontalLayoutConstraint.

Summary

Public constructors

@RequiresSchemaVersion(major = 1, minor = 200)
Builder(@Dimension(unit = 0) float value)

Creates a new builder for HorizontalLayoutConstraint.

Public methods

@NonNull DimensionBuilders.HorizontalLayoutConstraint

Builds an instance of HorizontalLayoutConstraint.

@NonNull DimensionBuilders.HorizontalLayoutConstraint.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setHorizontalAlignment(int horizontalAlignment)

Sets the horizontal alignment of the actual content within the space reserved by value.

Public constructors

Builder

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
public Builder(@Dimension(unit = 0) float value)

Creates a new builder for HorizontalLayoutConstraint.

Parameters
@Dimension(unit = 0) float value

Sets the value to use when laying out components which can have a dynamic value. Constrains the layout so that components are not changing size or location regardless of the dynamic value that is being provided.

Public methods

setHorizontalAlignment

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
public @NonNull DimensionBuilders.HorizontalLayoutConstraint.Builder setHorizontalAlignment(int horizontalAlignment)

Sets the horizontal alignment of the actual content within the space reserved by value. If not specified, defaults to center alignment.