界面需求描述:界面顶部标题栏,中间可滑动视图,底部固定布局,中间可滑动的视图在标题栏下方和底部视图上方展现。
刚开始的视图文件布局大概如下:
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/liveGoodsAddRootLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<include
android:id="@+id/titleLayout"
layout="@layout/layout_titleBar"
app:layout_constraintStart_toStartOf="parent"
/>
<androidx.core.widget.NestedScrollView
android:id="@+id/contentNestedScroll"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent