I have a webview in a coordinator layout together with the appbar. My toolbar overlaps some part of my webview and on scroll, the toolbar is hidden hence revealing the hidden part of the webview concealed by the toolbar. I would like my webview to be positioned below the toolbar and match parent when the toolbar is hidden.How can I go about it? >
<?xml version="1.0" encoding="utf-8">
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:background="#ffffff"
xmlns:app="http://schemas.android.com/tools"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/coordinatorLayout"
>
< android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:id="@+id/appbar"
>
<android.support.v7.widget.Toolbar
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:elevation="4dp"
app:layout_scrollFlags="scroll|enterAlways"
android:background="#e0e0e0"
app:titleTextColor="#FFFFFF"
app:popupTheme="@style/MyParentTheme.PopupOverlay"
android:id="@+id/toolbar"
/>
</ android.support.design.widget.AppBarLayout>
<com.kenyanews.inception.NestedWebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#55ff0000"
app:layout_behavior="@string/ appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>