public class Dimension


Represents a dimension (width or height) of a constrained widget

Summary

Nested types

public enum Dimension.Type

Constants

static final Object
static final Object
static final Object
static final Object
static final Object
static final Object

Public methods

void
apply(State state, ConstraintWidget constraintWidget, int orientation)

Apply the dimension to the given constraint widget

static Dimension
static Dimension
createFixed(int value)
static Dimension
static Dimension
createPercent(Object key, float value)
static Dimension
static Dimension
static Dimension
createSuggested(Object startValue)
static Dimension
createSuggested(int value)
static Dimension
boolean
equalsFixedValue(int value)

Returns true if the dimension is a fixed dimension of the same given value

Dimension
fixed(Object value)
Dimension
fixed(int value)
Dimension
max(Object value)
Dimension
max(int value)
Dimension
min(Object value)
Dimension
min(int value)
Dimension
percent(Object key, float value)
Dimension
ratio(String ratio)
Dimension
Dimension
suggested(int value)

Constants

FIXED_DIMENSION

Added in 1.1.0
public static final Object FIXED_DIMENSION

PARENT_DIMENSION

Added in 1.1.0
public static final Object PARENT_DIMENSION

PERCENT_DIMENSION

Added in 1.1.0
public static final Object PERCENT_DIMENSION

RATIO_DIMENSION

Added in 1.1.0
public static final Object RATIO_DIMENSION

SPREAD_DIMENSION

Added in 1.1.0
public static final Object SPREAD_DIMENSION

WRAP_DIMENSION

Added in 1.1.0
public static final Object WRAP_DIMENSION

Public methods

apply

Added in 1.1.0
public void apply(State state, ConstraintWidget constraintWidget, int orientation)

Apply the dimension to the given constraint widget

createFixed

Added in 1.1.0
public static Dimension createFixed(Object value)

createFixed

Added in 1.1.0
public static Dimension createFixed(int value)

createParent

Added in 1.1.0
public static Dimension createParent()

createPercent

Added in 1.1.0
public static Dimension createPercent(Object key, float value)

createRatio

Added in 1.1.0
public static Dimension createRatio(String ratio)

createSpread

Added in 1.1.0
public static Dimension createSpread()

createSuggested

Added in 1.1.0
public static Dimension createSuggested(Object startValue)

createSuggested

Added in 1.1.0
public static Dimension createSuggested(int value)

createWrap

Added in 1.1.0
public static Dimension createWrap()

equalsFixedValue

Added in 1.1.0
public boolean equalsFixedValue(int value)

Returns true if the dimension is a fixed dimension of the same given value

fixed

Added in 1.1.0
public Dimension fixed(Object value)

fixed

Added in 1.1.0
public Dimension fixed(int value)

max

Added in 1.1.0
public Dimension max(Object value)

max

Added in 1.1.0
public Dimension max(int value)

min

Added in 1.1.0
public Dimension min(Object value)

min

Added in 1.1.0
public Dimension min(int value)

percent

Added in 1.1.0
public Dimension percent(Object key, float value)

ratio

Added in 1.1.0
public Dimension ratio(String ratio)

suggested

Added in 1.1.0
public Dimension suggested(Object value)

suggested

Added in 1.1.0
public Dimension suggested(int value)