I have first layout I want to include
// first_layout.xml
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/tvFirstLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="First layout text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
And I have second layout, where first will be included
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<include layout="@layout/first_layout"/>
<TextView
android:id="@+id/tvSecondLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text of second layout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvFirstLayout"/> // THIS IS THE QUESTION
</androidx.constraintlayout.widget.ConstraintLayout>
Now the problem is use first textView as constraint to second textView. Any resolves of this ?