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

Commit 0f7e8366 authored by Tony Huang's avatar Tony Huang
Browse files

Refactor the toolbar to fit new directory design

Add directory_header layout for place new components (e.g. Apps
row, chips, root header row) and sort label. Rafer to new design,
it will be need scroll out (collapse) or pin on top with phone
device or tablet device. So use different layout to handle it.

1. On phone, add this layout in CollapsingToolbarLayout to handle
   scroll out behavior.
2. On tablet potrait, add this only on AppBarLayout because it
   does not need to be scroll out and only pin on top.
3. On tablet landscape, keep it as original design.
4. Let table header sort present on tablet potrait to follow new
   design.
5. Fix id "appBar" to "app_bar"

Bug: 111914879
Bug: 120467268
Test: atest DocumentsUITests
Change-Id: I17d5200b09e5a0351577023d8273bbd2c0bb498c
parent 6fa992d6
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<merge />
 No newline at end of file
+46 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<com.google.android.material.appbar.AppBarLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/app_bar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?android:attr/actionBarSize"
        android:background="?android:attr/colorPrimary"
        android:theme="?actionBarTheme"
        android:popupTheme="?actionBarPopupTheme"
        app:layout_collapseMode="pin">

        <com.android.documentsui.DropdownBreadcrumb
            android:id="@+id/dropdown_breadcrumb"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="4dp"
            android:popupTheme="?actionBarPopupTheme"
            android:background="@android:color/transparent"
            android:overlapAnchor="true"/>

    </androidx.appcompat.widget.Toolbar>

    <include layout="@layout/directory_header"/>

</com.google.android.material.appbar.AppBarLayout>
 No newline at end of file
+1 −1

File changed and moved.

Contains only whitespace changes.

Loading