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        <androidx.core.widget.NestedScrollView
34            android:layout_width="match_parent"
35            android:layout_height="wrap_content">
36
37            <include layout="@layout/directory_header"/>
38
39        </androidx.core.widget.NestedScrollView>
40
41        <View
42            android:id="@+id/toolbar_background_layout"
43            android:layout_width="match_parent"
44            android:layout_height="@dimen/action_bar_space_height"
45            android:background="?android:attr/colorBackground"
46            app:layout_collapseMode="pin"/>
47
48        <androidx.appcompat.widget.Toolbar
49            android:id="@+id/toolbar"
50            android:layout_width="match_parent"
51            android:layout_height="?android:attr/actionBarSize"
52            android:layout_margin="@dimen/search_bar_margin"
53            android:background="?android:attr/colorBackground"
54            android:theme="?actionBarTheme"
55            android:popupTheme="?actionBarPopupTheme"
56            android:elevation="3dp"
57            app:collapseContentDescription="@string/button_back"
58            app:titleTextAppearance="@style/ToolbarTitle"
59            app:layout_collapseMode="pin">
60
61            <TextView
62                android:id="@+id/searchbar_title"
63                android:layout_width="match_parent"
64                android:layout_height="?android:attr/actionBarSize"
65                android:gravity="center_vertical"
66                android:text="@string/search_bar_hint"
67                android:textAppearance="@style/SearchBarTitle"/>
68
69        </androidx.appcompat.widget.Toolbar>
70
71    </com.google.android.material.appbar.CollapsingToolbarLayout>
72
73</com.google.android.material.appbar.AppBarLayout>