How to include constraint layout to another constraint layout and set constraint between each
Actually found a solution. Android Studio does not autocomplete constraintLayout parameters in an include tag but they do have an impact on it as long as you give that include a size.
<include
layout="@layout/tmp_2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/label_2"
/>
To inlude one constraint layout and constraint it according to one's need, one will have to give width and height to the included layout like this :
<include
android:id="@+id/shop_card_layout"
layout="@layout/shop_card_one"
android:layout_height="wrap_content"
android:layout_width="300dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="@id/heading_tv"
app:layout_constraintTop_toBottomOf="@+id/heading_tv" />