问题:使用约束布局时,再使用include引用布局,造成约束的一些属性没有起作用。
解决方案:重写 android:layout_width、android:layout_height 这两个属性。
例如:
<include
layout="@layout/layout_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />