Class ChainHead
- java.lang.Object
-
- androidx.constraintlayout.core.widgets.ChainHead
-
public class ChainHead extends java.lang.ObjectClass to represent a chain by its main elements.
-
-
Field Summary
Fields Modifier and Type Field Description protected ConstraintWidgetmFirstprotected ConstraintWidgetmFirstMatchConstraintWidgetprotected ConstraintWidgetmFirstVisibleWidgetprotected booleanmHasComplexMatchWeightsprotected booleanmHasDefinedWeightsprotected booleanmHasRatioprotected booleanmHasUndefinedWeightsprotected ConstraintWidgetmHeadprotected ConstraintWidgetmLastprotected ConstraintWidgetmLastMatchConstraintWidgetprotected ConstraintWidgetmLastVisibleWidgetprotected floatmTotalWeightprotected java.util.ArrayList<ConstraintWidget>mWeightedMatchConstraintsWidgetsprotected intmWidgetsCountprotected intmWidgetsMatchCount
-
Constructor Summary
Constructors Constructor Description ChainHead(ConstraintWidget first, int orientation, boolean isRtl)Initialize variables, then determine visible widgets, the head of chain and matched constraint widgets.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefine()ConstraintWidgetgetFirst()ConstraintWidgetgetFirstMatchConstraintWidget()ConstraintWidgetgetFirstVisibleWidget()ConstraintWidgetgetHead()ConstraintWidgetgetLast()ConstraintWidgetgetLastMatchConstraintWidget()ConstraintWidgetgetLastVisibleWidget()floatgetTotalWeight()
-
-
-
Field Detail
-
mFirst
protected ConstraintWidget mFirst
-
mFirstVisibleWidget
protected ConstraintWidget mFirstVisibleWidget
-
mLast
protected ConstraintWidget mLast
-
mLastVisibleWidget
protected ConstraintWidget mLastVisibleWidget
-
mHead
protected ConstraintWidget mHead
-
mFirstMatchConstraintWidget
protected ConstraintWidget mFirstMatchConstraintWidget
-
mLastMatchConstraintWidget
protected ConstraintWidget mLastMatchConstraintWidget
-
mWeightedMatchConstraintsWidgets
protected java.util.ArrayList<ConstraintWidget> mWeightedMatchConstraintsWidgets
-
mWidgetsCount
protected int mWidgetsCount
-
mWidgetsMatchCount
protected int mWidgetsMatchCount
-
mTotalWeight
protected float mTotalWeight
-
mHasUndefinedWeights
protected boolean mHasUndefinedWeights
-
mHasDefinedWeights
protected boolean mHasDefinedWeights
-
mHasComplexMatchWeights
protected boolean mHasComplexMatchWeights
-
mHasRatio
protected boolean mHasRatio
-
-
Constructor Detail
-
ChainHead
public ChainHead(ConstraintWidget first, int orientation, boolean isRtl)
Initialize variables, then determine visible widgets, the head of chain and matched constraint widgets.- Parameters:
first- first widget in a chainorientation- orientation of the chain (either Horizontal or Vertical)isRtl- Right-to-left layout flag to determine the actual head of the chain
-
-
Method Detail
-
getFirst
public ConstraintWidget getFirst()
-
getFirstVisibleWidget
public ConstraintWidget getFirstVisibleWidget()
-
getLast
public ConstraintWidget getLast()
-
getLastVisibleWidget
public ConstraintWidget getLastVisibleWidget()
-
getHead
public ConstraintWidget getHead()
-
getFirstMatchConstraintWidget
public ConstraintWidget getFirstMatchConstraintWidget()
-
getLastMatchConstraintWidget
public ConstraintWidget getLastMatchConstraintWidget()
-
getTotalWeight
public float getTotalWeight()
-
define
public void define()
-
-