解决ConstraintLayout 与ScrollView 嵌套时ScrollView 内容没有完全显示

参考:
https://stackoverflow.com/questions/40637442/bottom-of-scrollview-clipped-when-using-constraintlayout

ConstraintLayout 布局中有ScrollView 时,ScrollView 的宽高要设置为0dp 才可以正确的约束布局

 <ScrollView
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:fillViewport="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/layout_item_binding_card_indicator">
 ScrollView>

你可能感兴趣的:(android)