I am facing weird issue with combination of CoordinatorLayout
,appbar_scrolling_view_behavior
and adjustResize
.
Using this combination, I have an layout which is scrollable, when keyboard comes up and dismisses, area behind keyboard is grays out. If I set flag to adjustPan
, this issue doesn't come up but I want to keep it as adjustResize. Below is code snippet.
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
style="@style/CollapsingToolbarLayoutStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
-----
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
It would be great if someone can give me a pointer on what exactly I am doing wrong :)
Thanks