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

Commit 6213e14f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[DocsUI M3] Restyle the nav tree in drawer layout" into main

parents 10f10a76 1677a706
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingTop="@dimen/main_container_padding_top">
            android:paddingTop="@dimen/main_container_padding_top"
            android:background="?attr/colorSurfaceBright">

            <FrameLayout
                android:layout_width="match_parent"
@@ -85,18 +86,7 @@
            android:layout_width="256dp"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:orientation="vertical"
            android:elevation="0dp"
            android:background="?android:attr/colorBackground">

            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/roots_toolbar"
                android:layout_width="match_parent"
                android:layout_height="?android:attr/actionBarSize"
                android:background="?android:attr/colorBackground"
                android:elevation="0dp"
                app:titleTextAppearance="@style/DrawerMenuTitle"
                app:titleTextColor="?android:colorAccent"/>
            android:orientation="vertical">

            <FrameLayout
                android:id="@+id/container_roots"
+2 −0
Original line number Diff line number Diff line
@@ -33,4 +33,6 @@
    <dimen name="main_container_padding_top">@dimen/space_extra_small_6</dimen>

    <dimen name="toolbar_padding_end">@dimen/space_small_3</dimen>

    <dimen name="drawer_padding_top">@dimen/space_small_1</dimen>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@

    <dimen name="drawer_edge_width">12dp</dimen>
    <dimen name="drawer_padding_horizontal">@dimen/space_extra_small_6</dimen>
    <dimen name="drawer_padding_top">@dimen/space_medium_1</dimen>
    <dimen name="drawer_padding_top">@dimen/space_small_3</dimen>
    <dimen name="drawer_padding_bottom">@dimen/space_small_1</dimen>
    <dimen name="drawer_divider_padding_horizontal">16dp</dimen>
    <dimen name="drawer_divider_padding_vertical">@dimen/space_extra_small_4</dimen>
+0 −5
Original line number Diff line number Diff line
@@ -70,11 +70,6 @@
        <item name="fontFamily">@string/config_fontFamilyMedium</item>
    </style>

    <style name="DrawerMenuTitle" parent="@style/TextAppearance.Material3.TitleLarge">
        <item name="android:textSize">24sp</item>
        <item name="fontFamily">@string/config_fontFamilyMedium</item>
    </style>

    <style name="DrawerMenuHeader" parent="@style/TextAppearance.Material3.BodyLarge">
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:textAllCaps">true</item>
+11 −3
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.documentsui;

import static com.android.documentsui.base.SharedMinimal.DEBUG;
import static com.android.documentsui.flags.Flags.useMaterial3;

import android.app.Activity;
import android.util.Log;
@@ -134,8 +135,12 @@ public class ActionModeController extends SelectionObserver<String>
        mActivity.getWindow().setTitle(mActivity.getTitle());

        // Re-enable TalkBack for the toolbars, as they are no longer covered by action mode.
        int[] toolbarIds =
                useMaterial3()
                        ? new int[] {R.id.toolbar}
                        : new int[] {R.id.toolbar, R.id.roots_toolbar};
        mScope.accessibilityImportanceSetter.setAccessibilityImportance(
                View.IMPORTANT_FOR_ACCESSIBILITY_AUTO, R.id.toolbar, R.id.roots_toolbar);
                View.IMPORTANT_FOR_ACCESSIBILITY_AUTO, toolbarIds);

        mNavigator.setActionModeActivated(false);
    }
@@ -151,10 +156,13 @@ public class ActionModeController extends SelectionObserver<String>

            // Hide the toolbars if action mode is enabled, so TalkBack doesn't navigate to
            // these controls when using linear navigation.
            int[] toolbarIds =
                    useMaterial3()
                            ? new int[] {R.id.toolbar}
                            : new int[] {R.id.toolbar, R.id.roots_toolbar};
            mScope.accessibilityImportanceSetter.setAccessibilityImportance(
                    View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS,
                    R.id.toolbar,
                    R.id.roots_toolbar);
                    toolbarIds);
            return true;
        }

Loading