public class WidgetContainer extends ConstraintWidget
ConstraintWidget.DimensionBehaviour| Modifier and Type | Field and Description |
|---|---|
java.util.ArrayList<ConstraintWidget> |
mChildren |
ANCHOR_BASELINE, ANCHOR_BOTTOM, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, BOTH, CHAIN_PACKED, CHAIN_SPREAD, CHAIN_SPREAD_INSIDE, DEFAULT_BIAS, DIRECT, frame, GONE, HORIZONTAL, horizontalChainRun, horizontalGroup, horizontalRun, INVISIBLE, isTerminalWidget, mAnchors, MATCH_CONSTRAINT_PERCENT, MATCH_CONSTRAINT_RATIO, MATCH_CONSTRAINT_RATIO_RESOLVED, MATCH_CONSTRAINT_SPREAD, MATCH_CONSTRAINT_WRAP, mBaseline, mBottom, mCenter, mDimensionRatio, mDimensionRatioSide, measured, mHorizontalResolution, mIsHeightWrapContent, mIsWidthWrapContent, mLeft, mListAnchors, mListDimensionBehaviors, mListNextMatchConstraintsWidget, mMatchConstraintDefaultHeight, mMatchConstraintDefaultWidth, mMatchConstraintMaxHeight, mMatchConstraintMaxWidth, mMatchConstraintMinHeight, mMatchConstraintMinWidth, mMatchConstraintPercentHeight, mMatchConstraintPercentWidth, mMinHeight, mMinWidth, mNextChainWidget, mOffsetX, mOffsetY, mParent, mResolvedMatchConstraintDefault, mRight, mTop, mVerticalResolution, mWeight, mX, mY, run, SOLVER, stringId, UNKNOWN, VERTICAL, verticalChainRun, verticalGroup, verticalRun, VISIBLE, WRAP_BEHAVIOR_HORIZONTAL_ONLY, WRAP_BEHAVIOR_INCLUDED, WRAP_BEHAVIOR_SKIPPED, WRAP_BEHAVIOR_VERTICAL_ONLY| Constructor and Description |
|---|
WidgetContainer()
Default constructor
|
WidgetContainer(int width,
int height)
Constructor
|
WidgetContainer(int x,
int y,
int width,
int height)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(ConstraintWidget... widgets)
Add multiple child widgets.
|
void |
add(ConstraintWidget widget)
Add a child widget
|
java.util.ArrayList<ConstraintWidget> |
getChildren()
Access the children
|
ConstraintWidgetContainer |
getRootConstraintContainer()
Return the top-level ConstraintWidgetContainer
|
void |
layout()
Function implemented by ConstraintWidgetContainer
|
void |
remove(ConstraintWidget widget)
Remove a child widget
|
void |
removeAllChildren() |
void |
reset() |
void |
resetSolverVariables(Cache cache)
Reset the solver variables of the anchors
|
void |
setOffset(int x,
int y)
Set the offset of this widget relative to the root widget.
|
addChildrenToSolverByDependency, addToSolver, allowedInBarrier, connect, connect, connect, connectCircularConstraint, copy, createObjectVariables, ensureMeasureRequested, ensureWidgetRuns, getAnchor, getAnchors, getBaselineDistance, getBiasPercent, getBottom, getCompanionWidget, getContainerItemSkip, getDebugName, getDimensionBehaviour, getDimensionRatio, getDimensionRatioSide, getHasBaseline, getHeight, getHorizontalBiasPercent, getHorizontalChainControlWidget, getHorizontalChainStyle, getHorizontalDimensionBehaviour, getHorizontalMargin, getLastHorizontalMeasureSpec, getLastVerticalMeasureSpec, getLeft, getLength, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getNextChainMember, getOptimizerWrapHeight, getOptimizerWrapWidth, getParent, getPreviousChainMember, getRight, getRootX, getRootY, getRun, getSceneString, getTop, getType, getVerticalBiasPercent, getVerticalChainControlWidget, getVerticalChainStyle, getVerticalDimensionBehaviour, getVerticalMargin, getVisibility, getWidth, getWrapBehaviorInParent, getX, getY, hasBaseline, hasDanglingDimension, hasDependencies, hasDimensionOverride, hasResolvedTargets, immediateConnect, isHeightWrapContent, isHorizontalSolvingPassDone, isInBarrier, isInHorizontalChain, isInPlaceholder, isInVerticalChain, isInVirtualLayout, isMeasureRequested, isResolvedHorizontally, isResolvedVertically, isRoot, isSpreadHeight, isSpreadWidth, isVerticalSolvingPassDone, isWidthWrapContent, markHorizontalSolvingPassDone, markVerticalSolvingPassDone, oppositeDimensionDependsOn, oppositeDimensionsTied, resetAllConstraints, resetAnchor, resetAnchors, resetFinalResolution, resetSolvingPassFlag, serialize, setBaselineDistance, setCompanionWidget, setContainerItemSkip, setDebugName, setDebugSolverName, setDimension, setDimensionRatio, setDimensionRatio, setFinalBaseline, setFinalFrame, setFinalHorizontal, setFinalLeft, setFinalTop, setFinalVertical, setFrame, setFrame, setGoneMargin, setHasBaseline, setHeight, setHeightWrapContent, setHorizontalBiasPercent, setHorizontalChainStyle, setHorizontalDimension, setHorizontalDimensionBehaviour, setHorizontalMatchStyle, setHorizontalWeight, setInBarrier, setInPlaceholder, setInVirtualLayout, setLastMeasureSpec, setLength, setMaxHeight, setMaxWidth, setMeasureRequested, setMinHeight, setMinWidth, setOrigin, setParent, setType, setupDimensionRatio, setVerticalBiasPercent, setVerticalChainStyle, setVerticalDimension, setVerticalDimensionBehaviour, setVerticalMatchStyle, setVerticalWeight, setVisibility, setWidth, setWidthWrapContent, setWrapBehaviorInParent, setX, setY, toString, updateFromRuns, updateFromSolverpublic java.util.ArrayList<ConstraintWidget> mChildren
public WidgetContainer()
public WidgetContainer(int x,
int y,
int width,
int height)
x - x positiony - y positionwidth - width of the layoutheight - height of the layoutpublic WidgetContainer(int width,
int height)
width - width of the layoutheight - height of the layoutpublic void reset()
reset in class ConstraintWidgetpublic void add(ConstraintWidget widget)
widget - to addpublic void add(ConstraintWidget... widgets)
widgets - to addpublic void remove(ConstraintWidget widget)
widget - to removepublic java.util.ArrayList<ConstraintWidget> getChildren()
public ConstraintWidgetContainer getRootConstraintContainer()
public void setOffset(int x,
int y)
setOffset in class ConstraintWidgetx - horizontal offsety - vertical offsetpublic void layout()
public void resetSolverVariables(Cache cache)
ConstraintWidgetresetSolverVariables in class ConstraintWidgetpublic void removeAllChildren()