Class State


  • public class State
    extends java.lang.Object
    Represents a full state of a ConstraintLayout
    • Field Detail

      • mReferences

        protected java.util.HashMap<java.lang.Object,​Reference> mReferences
      • mHelperReferences

        protected java.util.HashMap<java.lang.Object,​HelperReference> mHelperReferences
      • PARENT

        public static final java.lang.Integer PARENT
    • Constructor Detail

      • State

        public State()
    • Method Detail

      • setDpToPixel

        public void setDpToPixel​(CorePixelDp dpToPixel)
        Set the function that converts dp to Pixels
      • reset

        public void reset()
        Clear the state
      • convertDimension

        public int convertDimension​(java.lang.Object value)
        Implements a conversion function for values, returning int. This can be used in case values (e.g. margins) are represented via an object, not directly an int.
        Parameters:
        value - the object to convert from
      • createConstraintReference

        public ConstraintReference createConstraintReference​(java.lang.Object key)
        Create a new reference given a key.
      • sameFixedWidth

        public boolean sameFixedWidth​(int width)
      • sameFixedHeight

        public boolean sameFixedHeight​(int height)
      • horizontalGuideline

        public GuidelineReference horizontalGuideline​(java.lang.Object key)
      • verticalGuideline

        public GuidelineReference verticalGuideline​(java.lang.Object key)
      • guideline

        public GuidelineReference guideline​(java.lang.Object key,
                                            int orientation)
      • directMapping

        public void directMapping()
      • map

        public void map​(java.lang.Object key,
                        java.lang.Object view)
      • setTag

        public void setTag​(java.lang.String key,
                           java.lang.String tag)
      • getIdsForTag

        public java.util.ArrayList<java.lang.String> getIdsForTag​(java.lang.String tag)
      • baselineNeededFor

        public void baselineNeededFor​(java.lang.Object id)
        Baseline is needed for this object
      • isBaselineNeeded

        public boolean isBaselineNeeded​(ConstraintWidget constraintWidget)
        Does this constraintWidget need a baseline
        Returns:
        true if the constraintWidget needs a baseline