Android ConstraintLayout Toolbar

.....

android:id="@+id/toolbar"

android:layout_height="wrap_content"

android:layout_width="match_parent"

android:background="@color/colorAccent"

tools:layout_editor_absoluteY="0dp"

tools:layout_editor_absoluteX="8dp">

...

This view is not constrained, it only has designtime positions, so it will jump to (0,0) unless you add constraints


layout_editor_absoluteY 是绝对位置,删除就好了

你可能感兴趣的:(Android ConstraintLayout Toolbar)