1 min readJun 8, 2021
Difference between “Layout editor AbsoluteX” or Y and “Layout Margin” in ConstraintLayout Android
Layout editor AbsoluteXtools:layout_editor_absoluteX="60dp" The above takes the screen and give it a margin left(horizontal) of 60dp from the start of screen. Thats means even if it isn't constrained, it won't jump to top-left of screen at runtime.
tools:layout_editor_absoluteY="122dp"While this takes the screen and give it a margin top(vertical) of 122dp from the top of screen. Thats means even if it isn't constrained, it won't jump to top-left of screen at runtime. Layout Margin
Layout Marginandroid:layout_marginLeft="27dp"The above takes the constrain band and give it a margin left of 27dp starting from the constrain point. Thats means if it isn't constrained, it will jump to top-left of screen at runtime.android:layout_marginTop="32dp"The above takes the constrain band and give it a margin top of 32dp starting from the constrain point. Thats means if it isn't constrained, it will jump to top-left of screen at runtime.