How to Use Guidline and Barrier in ConstraintLayout




Guidelines are the lines which are shown at design time time either as vertical or horizontal. Guidelines are not visible to end user. When used with constraintlayout these are useful for creating constraints between views and guidelines



When we move or drag the guideline any view constraint to this guideline also move and adjusted
Please note the guidelines are lightweight views which are not visible to end user at run time but only used as refrence point for positioning our views in the ConstraintLayout



You can position the guideline within the layout based on either dp units or percent, relative to the layout's edge.
To create a guideline, click Guidelines in the toolbar, and then click either Add Vertical Guideline or Add Horizontal Guideline.
Drag the dotted line to reposition it and click the circle at the edge of the guideline to toggle the measurement mode.