Android's problem with ScrollView being invalid in ConstraintLayout

reason:

ScrollView is a frame layout, so the starting point starts at the upper left

solution:

<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/cl_tool">
</ScrollView>

The main setting is the width and height, as long as the width and height are set to 0dp, the problem can be solved

Guess you like

Origin blog.csdn.net/wxx314165038/article/details/132680518