{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

Constraints.Companion

public static class Constraints.Companion


Summary

Public methods

static final @NonNull Constraints
fixed(int width, int height)

Creates constraints for fixed size in both dimensions.

static final @NonNull Constraints
fixedHeight(int height)

Creates constraints for fixed height and unspecified width.

static final @NonNull Constraints
fixedWidth(int width)

Creates constraints for fixed width and unspecified height.

Public methods

fixed

public static final @NonNull Constraints fixed(int width, int height)

Creates constraints for fixed size in both dimensions.

fixedHeight

public static final @NonNull Constraints fixedHeight(int height)

Creates constraints for fixed height and unspecified width.

fixedWidth

public static final @NonNull Constraints fixedWidth(int width)

Creates constraints for fixed width and unspecified height.