У меня есть первый макет, который я хочу включить
// 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>
И у меня есть второй макет, где будет включен первый макет
<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>
Теперь проблема заключается в использовании первого textView в качестве ограничения для второй textView. Любые решает это?