Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a838a19e authored by Ben Reich's avatar Ben Reich
Browse files

Re-enable the scrolling behaviour for the drawer layout

This moves the MaterialToolbar out into the drawer_layout and updates
the app bar to include the scroll flags again.

Bug: 407876334
Test: m DocumentsUIGoogle and manual inspect
Flag: com.android.documentsui.flags.use_material3
Change-Id: Iee9797b90fb4243fbf91284aedbfe6a1ed8d4fed
parent 3a35c553
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -23,17 +23,12 @@
    android:layout_height="wrap_content"
    android:touchscreenBlocksFocus="false">

    <!-- Technically we don't need this CollapsingToolbarLayout wrapper when use_material3 flag
         is ON, because we don't want to hide anything in the app header area when scrolling, but
         some files (e.g. NavigationViewManager and others) uses the existence of this element to
         do some specific logic, hence leaving it here with "noScroll" behavior.
     -->
    <com.google.android.material.appbar.CollapsingToolbarLayout
        android:id="@+id/collapsing_toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:titleEnabled="false"
        app:layout_scrollFlags="noScroll">
        app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed">

        <LinearLayout
            android:layout_width="match_parent"
@@ -57,7 +52,8 @@
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:touchscreenBlocksFocus="false">
            android:touchscreenBlocksFocus="false"
            app:layout_collapseMode="pin">

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/searchbar_title"
+1 −4
Original line number Diff line number Diff line
@@ -304,10 +304,7 @@ public class NavigationViewManager extends SelectionTracker.SelectionObserver<St
    }

    public void update() {
        // If use_material3 flag is ON, we don't want any scroll behavior, thus skipping this logic.
        if (!isUseMaterial3FlagEnabled()) {
        updateScrollFlag();
        }
        updateToolbar();
        mProfileTabs.updateView();