Constraints.LayoutParams


public class Constraints.LayoutParams extends ConstraintLayout.LayoutParams


Summary

Public fields

float
boolean
float
float
float
float
float
float
float
float
float
float
float

Public constructors

LayoutParams(int width, int height)

Inherited Constants

From androidx.constraintlayout.widget.ConstraintLayout.LayoutParams
static final int

The baseline of the text in a view.

static final int
BOTTOM = 4

The bottom side of a view.

static final int

Chain packed style

static final int

Chain spread style

static final int

Chain spread inside style

static final int
CIRCLE = 8

Circle reference from a view.

static final int
END = 7

The right side of a view in left to right languages.

static final int
GONE_UNSET = -2147483648

Defines an id that is not set.

static final int

The horizontal orientation.

static final int
LEFT = 1

The left side of a view.

static final int

Dimension will be controlled by constraints.

static final int

Set matchConstraintDefault* percent to be based on a percent of another dimension (by default, the parent) Use to set the matchConstraintDefaultWidth and matchConstraintDefaultHeight

static final int

Set matchConstraintDefault* spread as much as possible within its constraints.

static final int

Set matchConstraintDefault* default to the wrap content size.

static final int

References the id of the parent.

static final int
RIGHT = 2

The right side of a view.

static final int
START = 6

The left side of a view in left to right languages.

static final int
TOP = 3

The top of a view.

static final int
UNSET = -1

Defines an id that is not set.

static final int

The vertical orientation.

static final int
static final int
static final int
static final int
From android.view.ViewGroup.LayoutParams
static final int

This field is deprecated.

static final int
static final int

Inherited fields

From androidx.constraintlayout.widget.ConstraintLayout.LayoutParams
int

The baseline margin.

int

Constrains the baseline of a child to the baseline of a target child (contains the target child id).

int

Constrains the baseline of a child to the bottom of a target child (contains the target child id).

int

Constrains the baseline of a child to the top of a target child (contains the target child id).

int

Constrains the bottom side of a child to the bottom side of a target child (contains the target child id).

int

Constrains the bottom side of a child to the top side of a target child (contains the target child id).

float

The angle used for a circular constraint]

int

Constrains the center of a child to the center of a target child (contains the target child id).

int

The radius used for a circular constraint

boolean

Specify if the vertical dimension is constrained in case both top &bottom constraints are set and the widget dimension is not a fixed dimension.

boolean

Specify if the horizontal dimension is constrained in case both left &right constraints are set and the widget dimension is not a fixed dimension.

String

Define a category of view to be used by helpers and motionLayout

String

The ratio information.

int

The design time location of the left side of the child.

int

The design time location of the right side of the child.

int

Constrains the end side of a child to the end side of a target child (contains the target child id).

int

Constrains the end side of a child to the start side of a target child (contains the target child id).

int

The baseline margin to use when the target is gone.

int

The bottom margin to use when the target is gone.

int

The end margin to use when the target is gone.

int

The left margin to use when the target is gone.

int

The right margin to use when the target is gone

int

The start margin to use when the target is gone.

int

The top margin to use when the target is gone.

int

The distance of child (guideline) to the top or left edge of its parent.

int

The distance of child (guideline) to the bottom or right edge of its parent.

float

The ratio of the distance to the parent's sides

boolean

The ratio of the distance to the parent's sides

boolean
float

The ratio between two connections when the left and right (or start and end) sides are constrained.

int

If the child is the start of a horizontal chain, this attribute will drive how the elements of the chain will be positioned.

float

The child's weight that we can use to distribute the available horizontal space in a chain, if the dimension behaviour is set to MATCH_CONSTRAINT

int

Constrains the left side of a child to the left side of a target child (contains the target child id).

int

Constrains the left side of a child to the right side of a target child (contains the target child id).

int

Define how the widget vertical dimension is handled when set to MATCH_CONSTRAINT

int

Define how the widget horizontal dimension is handled when set to MATCH_CONSTRAINT

int

Specify a maximum height size for the widget.

int

Specify a maximum width size for the widget.

int

Specify a minimum height size for the widget.

int

Specify a minimum width size for the widget.

float

Specify the percentage when using the match constraint percent mode.

float

Specify the percentage when using the match constraint percent mode.

int
int

Constrains the right side of a child to the left side of a target child (contains the target child id).

int

Constrains the right side of a child to the right side of a target child (contains the target child id).

int

Constrains the start side of a child to the end side of a target child (contains the target child id).

int

Constrains the start side of a child to the start side of a target child (contains the target child id).

int

Constrains the top side of a child to the bottom side of a target child (contains the target child id).

int

Constrains the top side of a child to the top side of a target child (contains the target child id).

float

The ratio between two connections when the top and bottom sides are constrained.

int

If the child is the start of a vertical chain, this attribute will drive how the elements of the chain will be positioned.

float

The child's weight that we can use to distribute the available vertical space in a chain, if the dimension behaviour is set to MATCH_CONSTRAINT

int

Specify how this view is taken in account during the parent's wrap computation Can be either of: WRAP_BEHAVIOR_INCLUDED the widget is taken in account for the wrap (default) WRAP_BEHAVIOR_HORIZONTAL_ONLY the widget will be included in the wrap only horizontally WRAP_BEHAVIOR_VERTICAL_ONLY the widget will be included in the wrap only vertically WRAP_BEHAVIOR_SKIPPED the widget is not part of the wrap computation

From android.view.ViewGroup.LayoutParams
From android.view.ViewGroup.MarginLayoutParams

Inherited methods

From androidx.constraintlayout.widget.ConstraintLayout.LayoutParams
String

Tag that can be used to identify a view as being a member of a group.

ConstraintWidget
void

Reset the ConstraintWidget

void
resolveLayoutDirection(int layoutDirection)
void
void

validate the layout

From android.view.ViewGroup.LayoutParams
void
setBaseAttributes(TypedArray a, int widthAttr, int heightAttr)
From android.view.ViewGroup.MarginLayoutParams
int
int
int
boolean
void
resolveLayoutDirection(int layoutDirection)
void
setLayoutDirection(int layoutDirection)
void
setMarginEnd(int end)
void
setMarginStart(int start)
void
setMargins(int left, int top, int right, int bottom)

Public fields

alpha

Added in 2.2.0
public float alpha

applyElevation

Added in 2.2.0
public boolean applyElevation

elevation

Added in 2.2.0
public float elevation

rotation

Added in 2.2.0
public float rotation

rotationX

Added in 2.2.0
public float rotationX

rotationY

Added in 2.2.0
public float rotationY

scaleX

Added in 2.2.0
public float scaleX

scaleY

Added in 2.2.0
public float scaleY

transformPivotX

Added in 2.2.0
public float transformPivotX

transformPivotY

Added in 2.2.0
public float transformPivotY

translationX

Added in 2.2.0
public float translationX

translationY

Added in 2.2.0
public float translationY

translationZ

Added in 2.2.0
public float translationZ

Public constructors

LayoutParams

Added in 2.2.0
public LayoutParams(Constraints.LayoutParams source)

LayoutParams

Added in 2.2.0
public LayoutParams(Context c, AttributeSet attrs)

LayoutParams

Added in 2.2.0
public LayoutParams(int width, int height)