[app] Don't let CollapsingToolbarLayout consume insets (#1430)
This commit is contained in:
parent
6a14dc184a
commit
afdfd58a13
|
|
@ -112,6 +112,17 @@ public class RepoFragment extends BaseFragment implements RepoLoader.Listener {
|
|||
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
||||
binding.progress.setVisibilityAfterHide(View.GONE);
|
||||
repoLoader.addListener(this);
|
||||
|
||||
/*
|
||||
CollapsingToolbarLayout consumes window insets, causing child views not
|
||||
receiving window insets.
|
||||
See https://github.com/material-components/material-components-android/issues/1310
|
||||
|
||||
Insets can be handled by RikkaX Insets, so we can manually set
|
||||
OnApplyWindowInsetsListener to null.
|
||||
*/
|
||||
|
||||
binding.collapsingToolbarLayout.setOnApplyWindowInsetsListener(null);
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,9 +31,11 @@
|
|||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true">
|
||||
android:fitsSystemWindows="false"
|
||||
app:fitsSystemWindowsInsets="top">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/collapsingToolbarLayoutMediumSize"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
||||
|
|
@ -69,9 +71,9 @@
|
|||
android:fadeScrollbars="true"
|
||||
android:scrollbarStyle="insideOverlay"
|
||||
android:scrollbars="vertical"
|
||||
app:borderTopVisibility="whenTop"
|
||||
app:borderTopDrawable="@null"
|
||||
app:borderBottomVisibility="never"
|
||||
app:borderTopDrawable="@null"
|
||||
app:borderTopVisibility="whenTop"
|
||||
app:fitsSystemWindowsInsets="bottom" />
|
||||
</FrameLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
Loading…
Reference in New Issue