public class FlowReference extends HelperReference


The FlowReference class can be used to store the relevant properties of a Flow Helper when parsing the Flow Helper information in a JSON representation.

Summary

Public constructors

Public methods

void
addFlowElement(
    String id,
    float weight,
    float preMargin,
    float postMargin
)

Relate widgets to the FlowReference

void
float

Get first horizontal bias

int

Get first horizontal style

float

Get first vertical bias

int

Get first vertical style

HelperWidget
int

Get horizontal align

float

Get horizontal bias

int

Get horizontal gap

int

Get horizontal style

float

Get last horizontal bias

int

Get last horizontal style

float

Get last vertical bias

int

Get last vertical style

int

Get max element wrap

int

Get the orientation of a Flow

int

Get paddingBottom

int

Get paddingLeft

int

Get paddingRight

int

Get paddingTop

int

Get vertical align

float

Get vertical bias

int

Get vertical gap

int

Get vertical style

int

Get wrap mode

void
setFirstHorizontalBias(float firstHorizontalBias)

Set first horizontal bias

void
setFirstHorizontalStyle(int firstHorizontalStyle)

Set first horizontal style

void
setFirstVerticalBias(float firstVerticalBias)

Set first vertical bias

void
setFirstVerticalStyle(int firstVerticalStyle)

Set first vertical style

void
void
setHorizontalAlign(int horizontalAlign)

Set horizontal align

void
setHorizontalGap(int horizontalGap)

Set horizontal gap

void
setHorizontalStyle(int horizontalStyle)

Set horizontal style

void
setLastHorizontalBias(float lastHorizontalBias)

Set last horizontal bias

void
setLastHorizontalStyle(int lastHorizontalStyle)

Set last horizontal style

void
setLastVerticalBias(float lastVerticalBias)

Set last vertical bias

void
setLastVerticalStyle(int lastVerticalStyle)

Set last vertical style

void
setMaxElementsWrap(int maxElementsWrap)

Set max element wrap

void
setOrientation(int mOrientation)

Set the orientation of a Flow

void
setPaddingBottom(int padding)

Set padding

void
setPaddingLeft(int padding)

Set paddingLeft

void
setPaddingRight(int padding)

Set paddingRight

void
setPaddingTop(int padding)

Set paddingTop

void
setVerticalAlign(int verticalAlign)

Set vertical align

void
setVerticalGap(int verticalGap)

Set vertical gap

void
setVerticalStyle(int verticalStyle)

set vertical style

void
setWrapMode(int wrap)

Set wrap Mode

Protected methods

float

Get the post margin of a widget

float

Get the pre margin of a widget

float

Get the weight of a widget

Inherited methods

From androidx.constraintlayout.core.state.ConstraintReference
void
addCustomColor(String name, int color)
void
addCustomFloat(String name, float value)
ConstraintReference
alpha(float alpha)
void

apply all the constraints attributes of the mConstraintWidget

ConstraintReference
ConstraintReference
ConstraintReference
ConstraintReference
baselineToTop(Object reference)
ConstraintReference
bias(float value)
ConstraintReference
ConstraintReference
ConstraintReference
bottomToTop(Object reference)
ConstraintReference
ConstraintReference
ConstraintReference
circularConstraint(Object reference, float angle, float distance)
ConstraintReference
ConstraintReference

Clears all constraints.

ConstraintReference
ConstraintReference
ConstraintWidget
ConstraintReference
end()
ConstraintReference
endToEnd(Object reference)
ConstraintReference
endToStart(Object reference)
float
Facade
Dimension
int
float
Object
float
float
float
float
float
float
float
String
float
float
float
int
getVerticalChainStyle(int chainStyle)
float
Object
Dimension
ConstraintReference
height(Dimension dimension)
ConstraintReference
horizontalBias(float value)
ConstraintReference
ConstraintReference
leftToLeft(Object reference)
ConstraintReference
leftToRight(Object reference)
ConstraintReference
margin(Object marginValue)
ConstraintReference
margin(int value)
ConstraintReference
marginGone(Object marginGoneValue)
ConstraintReference
marginGone(int value)
ConstraintReference
pivotX(float x)
ConstraintReference
pivotY(float y)
ConstraintReference
ConstraintReference
rightToLeft(Object reference)
ConstraintReference
rightToRight(Object reference)
ConstraintReference
rotationX(float x)
ConstraintReference
rotationY(float y)
ConstraintReference
rotationZ(float z)
ConstraintReference
scaleX(float x)
ConstraintReference
scaleY(float y)
void
void
setFacade(Facade facade)
ConstraintReference
setHeight(Dimension dimension)
void
setHorizontalChainStyle(int chainStyle)
void
void
void
void
setVerticalChainStyle(int chainStyle)
void
setVerticalChainWeight(float weight)
void
ConstraintReference
setWidth(Dimension dimension)
ConstraintReference
ConstraintReference
startToEnd(Object reference)
ConstraintReference
startToStart(Object reference)
ConstraintReference
top()
ConstraintReference
topToBottom(Object reference)
ConstraintReference
topToTop(Object reference)
ConstraintReference
translationX(float x)
ConstraintReference
translationY(float y)
ConstraintReference
translationZ(float z)
void

Validate the constraints

ConstraintReference
verticalBias(float value)
ConstraintReference
visibility(int visibility)
ConstraintReference
width(Dimension dimension)
From androidx.constraintlayout.core.state.HelperReference
HelperReference
add(Object[] objects)
void

Allows the derived classes to invoke the apply method in the ConstraintReference

ConstraintWidget
State.Helper

Protected fields

mFirstHorizontalBias

Added in 1.1.0
protected float mFirstHorizontalBias

mFirstHorizontalStyle

Added in 1.1.0
protected int mFirstHorizontalStyle

mFirstVerticalBias

Added in 1.1.0
protected float mFirstVerticalBias

mFirstVerticalStyle

Added in 1.1.0
protected int mFirstVerticalStyle

mFlow

Added in 1.1.0
protected Flow mFlow

mHorizontalAlign

Added in 1.1.0
protected int mHorizontalAlign

mHorizontalGap

Added in 1.1.0
protected int mHorizontalGap

mHorizontalStyle

Added in 1.1.0
protected int mHorizontalStyle

mLastHorizontalBias

Added in 1.1.0
protected float mLastHorizontalBias

mLastHorizontalStyle

Added in 1.1.0
protected int mLastHorizontalStyle

mLastVerticalBias

Added in 1.1.0
protected float mLastVerticalBias

mLastVerticalStyle

Added in 1.1.0
protected int mLastVerticalStyle

mMapPostMargin

Added in 1.1.0
protected HashMap<StringFloatmMapPostMargin

mMapPreMargin

Added in 1.1.0
protected HashMap<StringFloatmMapPreMargin

mMapWeights

Added in 1.1.0
protected HashMap<StringFloatmMapWeights

mMaxElementsWrap

Added in 1.1.0
protected int mMaxElementsWrap

mOrientation

Added in 1.1.0
protected int mOrientation

mPaddingBottom

Added in 1.1.0
protected int mPaddingBottom

mPaddingLeft

Added in 1.1.0
protected int mPaddingLeft

mPaddingRight

Added in 1.1.0
protected int mPaddingRight

mPaddingTop

Added in 1.1.0
protected int mPaddingTop

mVerticalAlign

Added in 1.1.0
protected int mVerticalAlign

mVerticalGap

Added in 1.1.0
protected int mVerticalGap

mVerticalStyle

Added in 1.1.0
protected int mVerticalStyle

mWrapMode

Added in 1.1.0
protected int mWrapMode

Public constructors

FlowReference

Added in 1.1.0
public FlowReference(State state, State.Helper type)

Public methods

addFlowElement

Added in 1.1.0
public void addFlowElement(
    String id,
    float weight,
    float preMargin,
    float postMargin
)

Relate widgets to the FlowReference

Parameters
String id

id of a widget

float weight

weight of a widget

float preMargin

preMargin of a widget

float postMargin

postMargin of a widget

apply

public void apply()

getFirstHorizontalBias

Added in 1.1.0
public float getFirstHorizontalBias()

Get first horizontal bias

Returns
float

first horizontal bias

getFirstHorizontalStyle

Added in 1.1.0
public int getFirstHorizontalStyle()

Get first horizontal style

Returns
int

first horizontal style

getFirstVerticalBias

Added in 1.1.0
public float getFirstVerticalBias()

Get first vertical bias

Returns
float

first vertical bias value

getFirstVerticalStyle

Added in 1.1.0
public int getFirstVerticalStyle()

Get first vertical style

Returns
int

first vertical style

getHelperWidget

public HelperWidget getHelperWidget()

getHorizontalAlign

Added in 1.1.0
public int getHorizontalAlign()

Get horizontal align

Returns
int

horizontal align value

getHorizontalBias

Added in 1.1.0
public float getHorizontalBias()

Get horizontal bias

Returns
float

horizontal bias value

getHorizontalGap

Added in 1.1.0
public int getHorizontalGap()

Get horizontal gap

Returns
int

horizontal gap value

getHorizontalStyle

Added in 1.1.0
public int getHorizontalStyle()

Get horizontal style

Returns
int

horizontal style

getLastHorizontalBias

Added in 1.1.0
public float getLastHorizontalBias()

Get last horizontal bias

Returns
float

last horizontal bias value

getLastHorizontalStyle

Added in 1.1.0
public int getLastHorizontalStyle()

Get last horizontal style

Returns
int

last horizontal style

getLastVerticalBias

Added in 1.1.0
public float getLastVerticalBias()

Get last vertical bias

Returns
float

last vertical bias

getLastVerticalStyle

Added in 1.1.0
public int getLastVerticalStyle()

Get last vertical style

Returns
int

last vertical style

getMaxElementsWrap

Added in 1.1.0
public int getMaxElementsWrap()

Get max element wrap

Returns
int

max element wrap value

getOrientation

Added in 1.1.0
public int getOrientation()

Get the orientation of a Flow

Returns
int

orientation value

getPaddingBottom

Added in 1.1.0
public int getPaddingBottom()

Get paddingBottom

Returns
int

paddingBottom value

getPaddingLeft

Added in 1.1.0
public int getPaddingLeft()

Get paddingLeft

Returns
int

paddingLeft value

getPaddingRight

Added in 1.1.0
public int getPaddingRight()

Get paddingRight

Returns
int

paddingRight value

getPaddingTop

Added in 1.1.0
public int getPaddingTop()

Get paddingTop

Returns
int

paddingTop value

getVerticalAlign

Added in 1.1.0
public int getVerticalAlign()

Get vertical align

Returns
int

vertical align value

getVerticalBias

Added in 1.1.0
public float getVerticalBias()

Get vertical bias

Returns
float

vertical bias value

getVerticalGap

Added in 1.1.0
public int getVerticalGap()

Get vertical gap

Returns
int

vertical gap value

getVerticalStyle

Added in 1.1.0
public int getVerticalStyle()

Get vertical style

Returns
int

vertical style

getWrapMode

Added in 1.1.0
public int getWrapMode()

Get wrap mode

Returns
int

wrap mode

setFirstHorizontalBias

Added in 1.1.0
public void setFirstHorizontalBias(float firstHorizontalBias)

Set first horizontal bias

Parameters
float firstHorizontalBias

first horizontal bias value

setFirstHorizontalStyle

Added in 1.1.0
public void setFirstHorizontalStyle(int firstHorizontalStyle)

Set first horizontal style

Parameters
int firstHorizontalStyle

Flow first horizontal style

setFirstVerticalBias

Added in 1.1.0
public void setFirstVerticalBias(float firstVerticalBias)

Set first vertical bias

Parameters
float firstVerticalBias

first vertical bias value

setFirstVerticalStyle

Added in 1.1.0
public void setFirstVerticalStyle(int firstVerticalStyle)

Set first vertical style

Parameters
int firstVerticalStyle

Flow first vertical style

setHelperWidget

public void setHelperWidget(HelperWidget widget)

setHorizontalAlign

Added in 1.1.0
public void setHorizontalAlign(int horizontalAlign)

Set horizontal align

Parameters
int horizontalAlign

horizontal align value

setHorizontalGap

Added in 1.1.0
public void setHorizontalGap(int horizontalGap)

Set horizontal gap

Parameters
int horizontalGap

horizontal gap value

setHorizontalStyle

Added in 1.1.0
public void setHorizontalStyle(int horizontalStyle)

Set horizontal style

Parameters
int horizontalStyle

Flow horizontal style

setLastHorizontalBias

Added in 1.1.0
public void setLastHorizontalBias(float lastHorizontalBias)

Set last horizontal bias

Parameters
float lastHorizontalBias

last horizontal bias value

setLastHorizontalStyle

Added in 1.1.0
public void setLastHorizontalStyle(int lastHorizontalStyle)

Set last horizontal style

Parameters
int lastHorizontalStyle

Flow last horizontal style

setLastVerticalBias

Added in 1.1.0
public void setLastVerticalBias(float lastVerticalBias)

Set last vertical bias

Parameters
float lastVerticalBias

last vertical bias value

setLastVerticalStyle

Added in 1.1.0
public void setLastVerticalStyle(int lastVerticalStyle)

Set last vertical style

Parameters
int lastVerticalStyle

Flow last vertical style

setMaxElementsWrap

Added in 1.1.0
public void setMaxElementsWrap(int maxElementsWrap)

Set max element wrap

Parameters
int maxElementsWrap

max element wrap value

setOrientation

Added in 1.1.0
public void setOrientation(int mOrientation)

Set the orientation of a Flow

Parameters
int mOrientation

orientation value

setPaddingBottom

Added in 1.1.0
public void setPaddingBottom(int padding)

Set padding

Parameters
int padding

paddingBottom value

setPaddingLeft

Added in 1.1.0
public void setPaddingLeft(int padding)

Set paddingLeft

Parameters
int padding

paddingLeft value

setPaddingRight

Added in 1.1.0
public void setPaddingRight(int padding)

Set paddingRight

Parameters
int padding

paddingRight value

setPaddingTop

Added in 1.1.0
public void setPaddingTop(int padding)

Set paddingTop

Parameters
int padding

paddingTop value

setVerticalAlign

Added in 1.1.0
public void setVerticalAlign(int verticalAlign)

Set vertical align

Parameters
int verticalAlign

vertical align value

setVerticalGap

Added in 1.1.0
public void setVerticalGap(int verticalGap)

Set vertical gap

Parameters
int verticalGap

vertical gap value

setVerticalStyle

Added in 1.1.0
public void setVerticalStyle(int verticalStyle)

set vertical style

Parameters
int verticalStyle

Flow vertical style

setWrapMode

Added in 1.1.0
public void setWrapMode(int wrap)

Set wrap Mode

Parameters
int wrap

wrap Mode

Protected methods

getPostMargin

Added in 1.1.0
protected float getPostMargin(String id)

Get the post margin of a widget

Parameters
String id

id id of a widget

Returns
float

the post margin of a widget

getPreMargin

Added in 1.1.0
protected float getPreMargin(String id)

Get the pre margin of a widget

Parameters
String id

id id of a widget

Returns
float

the pre margin of a widget

getWeight

Added in 1.1.0
protected float getWeight(String id)

Get the weight of a widget

Parameters
String id

id of a widget

Returns
float

the weight of a widget