Android Constraint Layout GuidLine

Default constraint layout. The controls inside are centered, you can use the guideline for reference

to draw the desired location

This layout has nothing on the rendering, that is, when it runs on the mobile phone, the Guideline has nothing.

The reason is because

There is nothing written in the draw method of the source code.

Two or three core attributes

direction

        android:orientation="vertical"

distance

        app:layout_constraintGuide_begin="100dp"

 By modifying to end, it is counted from the right or below

You can also use percentage

Very stylish. 

Guess you like

Origin blog.csdn.net/mp624183768/article/details/124441466