How I want to use NestedScrollView, the view for the toolbar at the top and the bottom View view at the bottom. The top and bottom view Toolbar and bottom view must always be in place.
How do I achieve this result for any device? I appreciate any answer, thank you.
Always like that:
It is my code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!--This is top-->
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="@color/colorPrimary">
<!--.........................-->
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/colorGreyFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<!--This is bottom-->
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/bottom_buttons_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:background="@color/colorWhite">
<!--..............................-->
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
question from:
https://stackoverflow.com/questions/65845360/linearlayout-and-nestedscrollview-problem 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…