FlowReference
public class FlowReference extends HelperReference
| java.lang.Object | |||
| ↳ | androidx.constraintlayout.core.state.ConstraintReference | ||
| ↳ | androidx.constraintlayout.core.state.HelperReference | ||
| ↳ | androidx.constraintlayout.core.state.helpers.FlowReference |
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
Protected fields |
|
|---|---|
float |
|
int |
|
float |
|
int |
|
Flow |
|
int |
|
int |
|
int |
|
float |
|
int |
|
float |
|
int |
|
HashMap<String, Float> |
|
HashMap<String, Float> |
|
HashMap<String, Float> |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
Public constructors |
|---|
FlowReference(State state, State.Helper type) |
Public methods |
|
|---|---|
void |
addFlowElement(Relate widgets to the FlowReference |
void |
apply() |
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 |
setHelperWidget(HelperWidget widget) |
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 |
getPostMargin(String id)Get the post margin of a widget |
float |
getPreMargin(String id)Get the pre margin of a widget |
float |
Get the weight of a widget |
Inherited fields |
|---|
Protected fields
Public constructors
Public methods
addFlowElement
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 |
getFirstHorizontalBias
public float getFirstHorizontalBias()
Get first horizontal bias
| Returns | |
|---|---|
float |
first horizontal bias |
getFirstHorizontalStyle
public int getFirstHorizontalStyle()
Get first horizontal style
| Returns | |
|---|---|
int |
first horizontal style |
getFirstVerticalBias
public float getFirstVerticalBias()
Get first vertical bias
| Returns | |
|---|---|
float |
first vertical bias value |
getFirstVerticalStyle
public int getFirstVerticalStyle()
Get first vertical style
| Returns | |
|---|---|
int |
first vertical style |
getHorizontalAlign
public int getHorizontalAlign()
Get horizontal align
| Returns | |
|---|---|
int |
horizontal align value |
getHorizontalBias
public float getHorizontalBias()
Get horizontal bias
| Returns | |
|---|---|
float |
horizontal bias value |
getHorizontalGap
public int getHorizontalGap()
Get horizontal gap
| Returns | |
|---|---|
int |
horizontal gap value |
getHorizontalStyle
public int getHorizontalStyle()
Get horizontal style
| Returns | |
|---|---|
int |
horizontal style |
getLastHorizontalBias
public float getLastHorizontalBias()
Get last horizontal bias
| Returns | |
|---|---|
float |
last horizontal bias value |
getLastHorizontalStyle
public int getLastHorizontalStyle()
Get last horizontal style
| Returns | |
|---|---|
int |
last horizontal style |
getLastVerticalBias
public float getLastVerticalBias()
Get last vertical bias
| Returns | |
|---|---|
float |
last vertical bias |
getLastVerticalStyle
public int getLastVerticalStyle()
Get last vertical style
| Returns | |
|---|---|
int |
last vertical style |
getMaxElementsWrap
public int getMaxElementsWrap()
Get max element wrap
| Returns | |
|---|---|
int |
max element wrap value |
getOrientation
public int getOrientation()
Get the orientation of a Flow
| Returns | |
|---|---|
int |
orientation value |
getPaddingBottom
public int getPaddingBottom()
Get paddingBottom
| Returns | |
|---|---|
int |
paddingBottom value |
getPaddingLeft
public int getPaddingLeft()
Get paddingLeft
| Returns | |
|---|---|
int |
paddingLeft value |
getPaddingRight
public int getPaddingRight()
Get paddingRight
| Returns | |
|---|---|
int |
paddingRight value |
getVerticalAlign
public int getVerticalAlign()
Get vertical align
| Returns | |
|---|---|
int |
vertical align value |
getVerticalBias
public float getVerticalBias()
Get vertical bias
| Returns | |
|---|---|
float |
vertical bias value |
getVerticalGap
public int getVerticalGap()
Get vertical gap
| Returns | |
|---|---|
int |
vertical gap value |
getVerticalStyle
public int getVerticalStyle()
Get vertical style
| Returns | |
|---|---|
int |
vertical style |
setFirstHorizontalBias
public void setFirstHorizontalBias(float firstHorizontalBias)
Set first horizontal bias
| Parameters | |
|---|---|
float firstHorizontalBias |
first horizontal bias value |
setFirstHorizontalStyle
public void setFirstHorizontalStyle(int firstHorizontalStyle)
Set first horizontal style
| Parameters | |
|---|---|
int firstHorizontalStyle |
Flow first horizontal style |
setFirstVerticalBias
public void setFirstVerticalBias(float firstVerticalBias)
Set first vertical bias
| Parameters | |
|---|---|
float firstVerticalBias |
first vertical bias value |
setFirstVerticalStyle
public void setFirstVerticalStyle(int firstVerticalStyle)
Set first vertical style
| Parameters | |
|---|---|
int firstVerticalStyle |
Flow first vertical style |
setHorizontalAlign
public void setHorizontalAlign(int horizontalAlign)
Set horizontal align
| Parameters | |
|---|---|
int horizontalAlign |
horizontal align value |
setHorizontalGap
public void setHorizontalGap(int horizontalGap)
Set horizontal gap
| Parameters | |
|---|---|
int horizontalGap |
horizontal gap value |
setHorizontalStyle
public void setHorizontalStyle(int horizontalStyle)
Set horizontal style
| Parameters | |
|---|---|
int horizontalStyle |
Flow horizontal style |
setLastHorizontalBias
public void setLastHorizontalBias(float lastHorizontalBias)
Set last horizontal bias
| Parameters | |
|---|---|
float lastHorizontalBias |
last horizontal bias value |
setLastHorizontalStyle
public void setLastHorizontalStyle(int lastHorizontalStyle)
Set last horizontal style
| Parameters | |
|---|---|
int lastHorizontalStyle |
Flow last horizontal style |
setLastVerticalBias
public void setLastVerticalBias(float lastVerticalBias)
Set last vertical bias
| Parameters | |
|---|---|
float lastVerticalBias |
last vertical bias value |
setLastVerticalStyle
public void setLastVerticalStyle(int lastVerticalStyle)
Set last vertical style
| Parameters | |
|---|---|
int lastVerticalStyle |
Flow last vertical style |
setMaxElementsWrap
public void setMaxElementsWrap(int maxElementsWrap)
Set max element wrap
| Parameters | |
|---|---|
int maxElementsWrap |
max element wrap value |
setOrientation
public void setOrientation(int mOrientation)
Set the orientation of a Flow
| Parameters | |
|---|---|
int mOrientation |
orientation value |
setPaddingBottom
public void setPaddingBottom(int padding)
Set padding
| Parameters | |
|---|---|
int padding |
paddingBottom value |
setPaddingLeft
public void setPaddingLeft(int padding)
Set paddingLeft
| Parameters | |
|---|---|
int padding |
paddingLeft value |
setPaddingRight
public void setPaddingRight(int padding)
Set paddingRight
| Parameters | |
|---|---|
int padding |
paddingRight value |
setPaddingTop
public void setPaddingTop(int padding)
Set paddingTop
| Parameters | |
|---|---|
int padding |
paddingTop value |
setVerticalAlign
public void setVerticalAlign(int verticalAlign)
Set vertical align
| Parameters | |
|---|---|
int verticalAlign |
vertical align value |
setVerticalGap
public void setVerticalGap(int verticalGap)
Set vertical gap
| Parameters | |
|---|---|
int verticalGap |
vertical gap value |
setVerticalStyle
public void setVerticalStyle(int verticalStyle)
set vertical style
| Parameters | |
|---|---|
int verticalStyle |
Flow vertical style |
setWrapMode
public void setWrapMode(int wrap)
Set wrap Mode
| Parameters | |
|---|---|
int wrap |
wrap Mode |
Protected methods
getPostMargin
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
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 |