Fix toolbar layout save state (#1558)

This commit is contained in:
LoveSy 2022-01-25 18:15:06 +08:00 committed by GitHub
parent 255ebe3458
commit fd0707e4f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 4 deletions

View File

@ -21,6 +21,7 @@
<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:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:consumeSystemWindowsInsets="@integer/internal_fragment_insets"
@ -36,6 +37,7 @@
app:fitsSystemWindowsInsets="@integer/internal_fragment_top_insets">
<com.google.android.material.appbar.SubtitleCollapsingToolbarLayout
android:id="@+id/toolbar_layout"
style="?attr/collapsingToolbarLayoutLargeStyle"
android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize"
@ -76,8 +78,8 @@
android:tooltipText="@string/module_settings"
android:visibility="gone"
app:backgroundTint="?attr/colorPrimary"
app:layout_fitsSystemWindowsInsets="@integer/internal_fragment_bottom_insets"
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
app:layout_fitsSystemWindowsInsets="@integer/internal_fragment_bottom_insets"
app:tint="?attr/colorOnPrimary" />
<LinearLayout

View File

@ -21,6 +21,7 @@
<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:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:consumeSystemWindowsInsets="@integer/internal_fragment_insets"
@ -35,6 +36,7 @@
app:fitsSystemWindowsInsets="@integer/internal_fragment_top_insets">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
style="?collapsingToolbarLayoutLargeStyle"
android:layout_width="match_parent"
android:layout_height="?collapsingToolbarLayoutLargeSize"
@ -51,10 +53,10 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
app:titleMarginStart="@dimen/m3_alert_dialog_icon_margin"
android:elevation="0dp"
app:layout_collapseMode="pin"
app:logo="@drawable/ic_launcher" />
app:logo="@drawable/ic_launcher"
app:titleMarginStart="@dimen/m3_alert_dialog_icon_margin" />
</com.google.android.material.appbar.CollapsingToolbarLayout>

View File

@ -19,6 +19,7 @@
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
@ -91,7 +92,7 @@
android:tooltipText="@string/add_module_to_user"
android:visibility="gone"
app:backgroundTint="?attr/colorPrimary"
app:layout_fitsSystemWindowsInsets="@integer/internal_fragment_bottom_insets"
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
app:layout_fitsSystemWindowsInsets="@integer/internal_fragment_bottom_insets"
app:tint="?attr/colorOnPrimary" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -20,6 +20,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:consumeSystemWindowsInsets="@integer/internal_fragment_insets"

View File

@ -20,6 +20,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:consumeSystemWindowsInsets="@integer/internal_fragment_insets"
@ -34,6 +35,7 @@
app:fitsSystemWindowsInsets="@integer/internal_fragment_top_insets">
<com.google.android.material.appbar.SubtitleCollapsingToolbarLayout
android:id="@+id/toolbar_layout"
style="?attr/collapsingToolbarLayoutLargeStyle"
android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize"