public class ConstraintWidgetContainer extends WidgetContainer
ConstraintWidget.DimensionBehaviour| Modifier and Type | Field and Description |
|---|---|
DependencyGraph |
mDependencyGraph |
boolean |
mGroupsWrapOptimized |
int |
mHorizontalChainsSize |
boolean |
mHorizontalWrapOptimized |
BasicMeasure.Measure |
mMeasure |
protected BasicMeasure.Measurer |
mMeasurer |
Metrics |
mMetrics |
boolean |
mSkipSolver |
protected LinearSystem |
mSystem |
int |
mVerticalChainsSize |
boolean |
mVerticalWrapOptimized |
int |
mWrapFixedHeight |
int |
mWrapFixedWidth |
mChildrenANCHOR_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 |
|---|
ConstraintWidgetContainer()
Default constructor
|
ConstraintWidgetContainer(int width,
int height)
Constructor
|
ConstraintWidgetContainer(int x,
int y,
int width,
int height)
Constructor
|
ConstraintWidgetContainer(java.lang.String debugName,
int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addChildrenToSolver(LinearSystem system)
Add this widget to the solver
|
void |
addHorizontalWrapMaxVariable(ConstraintAnchor right) |
void |
addHorizontalWrapMinVariable(ConstraintAnchor left) |
void |
defineTerminalWidgets() |
boolean |
directMeasure(boolean optimizeWrap) |
boolean |
directMeasureSetup(boolean optimizeWrap) |
boolean |
directMeasureWithOrientation(boolean optimizeWrap,
int orientation) |
void |
fillMetrics(Metrics metrics) |
java.util.ArrayList<Guideline> |
getHorizontalGuidelines()
Accessor to the horizontal guidelines contained in the table.
|
BasicMeasure.Measurer |
getMeasurer() |
int |
getOptimizationLevel()
Returns the current optimization level
|
void |
getSceneString(java.lang.StringBuilder ret) |
LinearSystem |
getSystem() |
java.lang.String |
getType()
Specify the xml type for the container
|
java.util.ArrayList<Guideline> |
getVerticalGuidelines()
Accessor to the vertical guidelines contained in the table.
|
boolean |
handlesInternalConstraints()
Indicates if the container knows how to layout its content on its own
|
void |
invalidateGraph()
Invalidate the graph of constraints
|
void |
invalidateMeasures()
Invalidate the widgets measures
|
boolean |
isHeightMeasuredTooSmall()
Return true if the height given is too small for the content laid out
|
boolean |
isRtl()
Returns the rtl status.
|
boolean |
isWidthMeasuredTooSmall()
Return true if the width given is too small for the content laid out
|
void |
layout()
Layout the tree of widgets
|
static boolean |
measure(int level,
ConstraintWidget widget,
BasicMeasure.Measurer measurer,
BasicMeasure.Measure measure,
int measureStrategy) |
long |
measure(int optimizationLevel,
int widthMode,
int widthSize,
int heightMode,
int heightSize,
int lastMeasureWidth,
int lastMeasureHeight,
int paddingX,
int paddingY)
Measure the layout
|
boolean |
optimizeFor(int feature)
Returns true if the given feature should be optimized
|
void |
reset() |
void |
setMeasurer(BasicMeasure.Measurer measurer) |
void |
setOptimizationLevel(int value)
Resolves the system directly when possible
|
void |
setPadding(int left,
int top,
int right,
int bottom)
Set the padding on this container.
|
void |
setPass(int pass)
Keep track of the # of passes
|
void |
setRtl(boolean isRtl)
Set the rtl status.
|
boolean |
updateChildrenFromSolver(LinearSystem system,
boolean[] flags)
Update the frame of the layout and its children from the solver
|
void |
updateFromRuns(boolean updateHorizontal,
boolean updateVertical) |
void |
updateHierarchy() |
add, add, getChildren, getRootConstraintContainer, remove, removeAllChildren, resetSolverVariables, setOffsetaddChildrenToSolverByDependency, 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, getTop, getVerticalBiasPercent, getVerticalChainControlWidget, getVerticalChainStyle, getVerticalDimensionBehaviour, getVerticalMargin, getVisibility, getWidth, getWrapBehaviorInParent, getX, getY, hasBaseline, hasDanglingDimension, hasDependencies, hasDimensionOverride, hasResolvedTargets, immediateConnect, isAnimated, 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, setAnimated, 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, updateFromSolverpublic DependencyGraph mDependencyGraph
protected BasicMeasure.Measurer mMeasurer
public Metrics mMetrics
protected LinearSystem mSystem
public int mHorizontalChainsSize
public int mVerticalChainsSize
public boolean mGroupsWrapOptimized
public boolean mHorizontalWrapOptimized
public boolean mVerticalWrapOptimized
public int mWrapFixedWidth
public int mWrapFixedHeight
public boolean mSkipSolver
public BasicMeasure.Measure mMeasure
public ConstraintWidgetContainer()
public ConstraintWidgetContainer(int x,
int y,
int width,
int height)
x - x positiony - y positionwidth - width of the layoutheight - height of the layoutpublic ConstraintWidgetContainer(int width,
int height)
width - width of the layoutheight - height of the layoutpublic ConstraintWidgetContainer(java.lang.String debugName,
int width,
int height)
public void invalidateGraph()
public void invalidateMeasures()
public boolean directMeasure(boolean optimizeWrap)
public boolean directMeasureSetup(boolean optimizeWrap)
public boolean directMeasureWithOrientation(boolean optimizeWrap,
int orientation)
public void defineTerminalWidgets()
public long measure(int optimizationLevel,
int widthMode,
int widthSize,
int heightMode,
int heightSize,
int lastMeasureWidth,
int lastMeasureHeight,
int paddingX,
int paddingY)
optimizationLevel - widthMode - widthSize - heightMode - heightSize - paddingX - paddingY - public void updateHierarchy()
public void setMeasurer(BasicMeasure.Measurer measurer)
public BasicMeasure.Measurer getMeasurer()
public void fillMetrics(Metrics metrics)
public void setOptimizationLevel(int value)
value - optimization levelpublic int getOptimizationLevel()
public boolean optimizeFor(int feature)
feature - public java.lang.String getType()
getType in class ConstraintWidgetpublic void reset()
reset in class WidgetContainerpublic boolean isWidthMeasuredTooSmall()
public boolean isHeightMeasuredTooSmall()
public void addHorizontalWrapMinVariable(ConstraintAnchor left)
public void addHorizontalWrapMaxVariable(ConstraintAnchor right)
public boolean addChildrenToSolver(LinearSystem system)
system - the solver we want to add the widget topublic boolean updateChildrenFromSolver(LinearSystem system, boolean[] flags)
system - the solver we get the values from.public void updateFromRuns(boolean updateHorizontal,
boolean updateVertical)
updateFromRuns in class ConstraintWidgetpublic void setPadding(int left,
int top,
int right,
int bottom)
left - left paddingtop - top paddingright - right paddingbottom - bottom paddingpublic void setRtl(boolean isRtl)
isRtl - true if we are in RTL.public boolean isRtl()
public static boolean measure(int level,
ConstraintWidget widget,
BasicMeasure.Measurer measurer,
BasicMeasure.Measure measure,
int measureStrategy)
public void layout()
layout in class WidgetContainerpublic boolean handlesInternalConstraints()
public java.util.ArrayList<Guideline> getVerticalGuidelines()
public java.util.ArrayList<Guideline> getHorizontalGuidelines()
public LinearSystem getSystem()
public void setPass(int pass)
pass - public void getSceneString(java.lang.StringBuilder ret)
getSceneString in class ConstraintWidget