美文网首页
nestScrollView 嵌套:Constraintlayo

nestScrollView 嵌套:Constraintlayo

作者: 朱_c713 | 来源:发表于2020-07-15 16:11 被阅读0次

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"

相关文章

网友评论

      本文标题:nestScrollView 嵌套:Constraintlayo

      本文链接:https://www.haomeiwen.com/subject/gncjhktx.html