Relative Layout and Constraint Layout equivalent properties
(1) Relative Layout:
android:layout_centerInParent="true"
(1) Constraint Layout equivalent :
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
(2) Relative Layout:
android:layout_centerHorizontal="true"
(2) Constraint Layout equivalent:
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintEnd_toEndOf="parent"
(3) Relative Layout:
android:layout_centerVertical="true"
(3) Constraint Layout equivalent:
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
(4) Relative Layout:
android:layout_alignParentLeft="true"
(4) Constraint Layout equivalent:
app:layout_constraintLeft_toLeftOf="parent"
(5) Relative Layout:
android:layout_alignParentStart="true"
(5) Constraint Layout equivalent:
app:layout_constraintStart_toStartOf="parent"
(6) Relative Layout:
android:layout_alignParentRight="true"
(6) Constraint Layout equivalent:
app:layout_constraintRight_toRightOf="parent"
(7) Relative Layout:
android:layout_alignParentEnd="true"
(7) Constraint Layout equivalent:
app:layout_constraintEnd_toEndOf="parent"
(8) Relative Layout:
android:layout_alignParentTop="true"
(8) Constraint Layout equivalent:
app:layout_constraintTop_toTopOf="parent"
(9) Relative Layout:
android:layout_alignParentBottom="true"
(9) Constraint Layout equivalent:
app:layout_constraintBottom_toBottomOf="parent"
(10) Relative Layout:
android:layout_alignStart="@id/view"
(10) Constraint Layout equivalent:
app:layout_constraintStart_toStartOf="@id/view"
(11) Relative Layout:
android:layout_alignLeft="@id/view"
(11) Constraint Layout equivalent:
app:layout_constraintLeft_toLeftOf="@id/view"
(12) Relative Layout:
android:layout_alignEnd="@id/view"
(12) Constraint Layout equivalent:
app:layout_constraintEnd_toEndOf="@id/view"
(13) Relative Layout:
android:layout_alignRight="@id/view"
(13) Constraint Layout equivalent:
app:layout_constraintRight_toRightOf="@id/view"
(14) Relative Layout:
android:layout_alignTop="@id/view"
(14) Constraint Layout equivalent:
app:layout_constraintTop_toTopOf="@id/view"
(15) Relative Layout:
android:layout_alignBaseline="@id/view"
(15) Constraint Layout equivalent:
app:layout_constraintBaseline_toBaselineOf="@id/view"
(16) Relative Layout:
android:layout_alignBottom="@id/view"
(16) Constraint Layout equivalent:
app:layout_constraintBottom_toBottomOf="@id/view"
(17) Relative Layout:
android:layout_toStartOf="@id/view"
(17) Constraint Layout equivalent:
app:layout_constraintEnd_toStartOf="@id/view"
(18) Relative Layout:
android:layout_toLeftOf="@id/view"
(18) Constraint Layout equivalent:
app:layout_constraintRight_toLeftOf="@id/view"
(19) Relative Layout:
android:layout_toEndOf="@id/view"
(19) Constraint Layout equivalent:
app:layout_constraintStart_toEndOf="@id/view"
(20) Relative Layout:
android:layout_toRightOf="@id/view"
(20) Constraint Layout equivalent:
app:layout_constraintLeft_toRightOf="@id/view"
(21) Relative Layout:
android:layout_above="@id/view"
(21) Constraint Layout equivalent:
app:layout_constraintBottom_toTopOf="@id/view"
(22) Relative Layout:
android:layout_below="@id/view"
(22) Constraint Layout equivalent:
app:layout_constraintTop_toBottomOf="@id/view"