Fix SnackBar shows behind window insets

This commit is contained in:
残页
2022-06-03 18:21:56 +08:00
committed by GitHub
parent 7ae3cd1c43
commit 2106751ea4
6 changed files with 41 additions and 14 deletions
@@ -13,20 +13,31 @@
</data>
<androidx.recyclerview.widget.RecyclerView
app:items="@{viewModel.items}"
app:extraBindings="@{viewModel.extraBindings}"
android:id="@+id/settings_list"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="false"
android:clipToPadding="false"
android:orientation="vertical"
android:paddingTop="@dimen/internal_action_bar_size"
app:fitsSystemWindowsInsets="top|bottom"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:layout_marginTop="24dp"
tools:listitem="@layout/item_settings"
tools:paddingTop="@dimen/l1" />
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
app:items="@{viewModel.items}"
app:extraBindings="@{viewModel.extraBindings}"
android:id="@+id/settings_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="false"
android:clipToPadding="false"
android:orientation="vertical"
android:paddingTop="@dimen/internal_action_bar_size"
app:fitsSystemWindowsInsets="top|bottom"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:layout_marginTop="24dp"
tools:listitem="@layout/item_settings"
tools:paddingTop="@dimen/l1" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/snackbar_container"
app:fitsSystemWindowsInsets="top|bottom"/>
</FrameLayout>
</layout>
@@ -43,6 +43,12 @@
</FrameLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/snackbar_container"
app:fitsSystemWindowsInsets="top|bottom"/>
</FrameLayout>
</layout>