nestScrollView 嵌套:Constraintlayout布局,不显示,显示不全,不显示下方布局。
参考链接:
https://blog.csdn.net/sheilazxx/article/details/79194920
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
>
<com.ttlock.roommaster.ui.TitlebarLayout
android:id="@+id/titlebar"
android:layout_width="match_parent"
android:layout_height="@dimen/titlebar_height"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"></com.ttlock.roommaster.ui.TitlebarLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/titlebar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
关键其作用的代码:
ScrollView中的:
app:layout_constraintBottom_toBottomOf="parent"
以及最外层:
android:layout_height="match_parent"
网友评论