1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2018 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<com.google.android.material.appbar.AppBarLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:id="@+id/app_bar" 21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:background="?android:attr/colorBackground"> 24 25 <com.google.android.material.appbar.CollapsingToolbarLayout 26 android:id="@+id/collapsing_toolbar" 27 android:layout_width="match_parent" 28 android:layout_height="wrap_content" 29 android:elevation="3dp" 30 app:titleEnabled="false" 31 app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"> 32 33 <include layout="@layout/directory_header"/> 34 35 <View 36 android:id="@+id/toolbar_background_layout" 37 android:layout_width="match_parent" 38 android:layout_height="@dimen/action_bar_space_height" 39 android:background="?android:attr/colorBackground" 40 app:layout_collapseMode="pin"/> 41 42 <androidx.appcompat.widget.Toolbar 43 android:id="@+id/toolbar" 44 android:layout_width="match_parent" 45 android:layout_height="?android:attr/actionBarSize" 46 android:layout_margin="@dimen/search_bar_margin" 47 android:background="?android:attr/colorBackground" 48 android:theme="?actionBarTheme" 49 android:popupTheme="?actionBarPopupTheme" 50 android:elevation="3dp" 51 app:titleTextAppearance="@style/ToolbarTitle" 52 app:layout_collapseMode="pin"> 53 54 <TextView 55 android:id="@+id/searchbar_title" 56 android:layout_width="match_parent" 57 android:layout_height="?android:attr/actionBarSize" 58 android:gravity="center_vertical" 59 android:text="@string/search_bar_hint" 60 android:textAppearance="@style/SearchBarTitle"/> 61 62 <com.android.documentsui.DropdownBreadcrumb 63 android:id="@+id/dropdown_breadcrumb" 64 android:layout_width="wrap_content" 65 android:layout_height="match_parent" 66 android:layout_marginStart="4dp" 67 android:popupTheme="?actionBarPopupTheme" 68 android:background="@android:color/transparent" 69 android:overlapAnchor="true"/> 70 71 </androidx.appcompat.widget.Toolbar> 72 73 </com.google.android.material.appbar.CollapsingToolbarLayout> 74 75</com.google.android.material.appbar.AppBarLayout>