Помогите разобраться с проблемой. Есть DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout 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:id="@+id/drawerlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorBgPages"
tools:openDrawer="start">
<include
layout="@layout/toolbar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ViewStub
android:id="@+id/view_stub"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout="@layout/no_net" />
</FrameLayout>
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
app:defaultNavHost="true"
app:navGraph="@navigation/nav_graph" />
</FrameLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@color/colorBgPages"
app:headerLayout="@layout/header"
app:itemTextColor="@color/colorPrimaryDark"
app:menu="@menu/drawermenu" />
</androidx.drawerlayout.widget.DrawerLayout>
В одном из фрагментов есть layout с такой разметкой
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:background="@color/colorBgPages"
android:fitsSystemWindows="false"
tools:context=".fragments.NewsDetail">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_news_detail"
android:layout_width="match_parent"
android:layout_height="160dp"
android:background="@color/colorBgPages"
android:fitsSystemWindows="true"
app:elevation="0dp"
android:theme="@style/AppTheme.AppBarOverlay">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:collapsedTitleTextAppearance="@style/CustomTitleCollapsed"
app:contentScrim="@color/colorBgPages"
app:expandedTitleGravity="top"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<ImageView
android:id="@+id/img_header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:scaleType="centerCrop"
app:layout_collapseParallaxMultiplier="0.5"
app:layout_collapseMode="parallax" />
<TextView
android:id="@+id/txt_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:background="@color/opacityBg"
android:fontFamily="@font/new_roman_italic_bold"
android:padding="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_collapseMode="pin" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_news_detail"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:titleTextAppearance="@style/TitleText" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_news_detail" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@layout/content_news_detail
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_marginRight="8dp"
android:fillViewport="true"
android:paddingBottom="?attr/actionBarSize"
android:layout_marginLeft="8dp">
<LinearLayout
android:id="@+id/linear_layout_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ProgressBar
android:id="@+id/progress_bar_news_detail"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<WebView
android:id="@+id/web_view_news_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
Изначально отображается нормально
Но при скролле вверх появляется отступ внизу. Как от него избавиться?