1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2024 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<!-- CoordinatorLayout is necessary for various components (e.g. Snackbars, and 18 floating action buttons) to operate correctly. --> 19<androidx.coordinatorlayout.widget.CoordinatorLayout 20 xmlns:android="http://schemas.android.com/apk/res/android" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent" 23 android:id="@+id/coordinator_layout" 24 android:focusable="true"> 25 26 <LinearLayout 27 android:layout_width="match_parent" 28 android:layout_height="match_parent" 29 android:orientation="horizontal" 30 android:baselineAligned="false" 31 android:background="?attr/colorSurfaceContainer" 32 android:paddingTop="@dimen/layout_padding_top" 33 android:paddingBottom="@dimen/layout_padding_bottom" 34 android:paddingEnd="@dimen/layout_padding_end"> 35 <!-- Navigation: left hand side. --> 36 <FrameLayout 37 android:id="@+id/container_roots" 38 android:layout_width="256dp" 39 android:layout_height="match_parent" 40 /> 41 42 <!-- Main container for the right hand side. --> 43 <LinearLayout 44 android:layout_width="match_parent" 45 android:layout_height="match_parent" 46 android:orientation="vertical"> 47 48 <!-- Top section: toolbar, search chips, profile tab --> 49 <LinearLayout 50 android:layout_width="match_parent" 51 android:layout_height="wrap_content" 52 android:orientation="vertical" 53 android:paddingTop="@dimen/main_container_padding_top" 54 android:background="@drawable/main_container_top_section_background"> 55 56 <com.google.android.material.appbar.MaterialToolbar 57 android:id="@+id/toolbar" 58 android:layout_width="match_parent" 59 android:layout_height="?attr/actionBarSize" 60 android:layout_marginTop="@dimen/action_bar_margin" 61 android:touchscreenBlocksFocus="false"> 62 63 <TextView 64 android:id="@+id/searchbar_title" 65 android:layout_width="match_parent" 66 android:layout_height="?android:attr/actionBarSize" 67 android:gravity="center_vertical" 68 android:text="@string/search_bar_hint" 69 android:textAppearance="@style/SearchBarTitle" /> 70 71 </com.google.android.material.appbar.MaterialToolbar> 72 73 <include layout="@layout/directory_header" /> 74 75 </LinearLayout> 76 77 <!-- Main list area (file list/grid or search results). --> 78 <LinearLayout 79 android:layout_width="match_parent" 80 android:layout_height="0dp" 81 android:layout_weight="1" 82 android:orientation="vertical" 83 android:layout_marginTop="@dimen/main_container_section_gap" 84 android:background="@drawable/main_container_middle_section_background"> 85 86 <include layout="@layout/column_headers"/> 87 88 <FrameLayout 89 android:layout_width="match_parent" 90 android:layout_height="0dp" 91 android:layout_weight="1"> 92 93 <FrameLayout 94 android:id="@+id/container_directory" 95 android:clipToPadding="false" 96 android:layout_width="match_parent" 97 android:layout_height="match_parent" /> 98 99 <FrameLayout 100 android:id="@+id/container_search_fragment" 101 android:clipToPadding="false" 102 android:layout_width="match_parent" 103 android:layout_height="match_parent" /> 104 105 </FrameLayout> 106 </LinearLayout> 107 108 <!-- Footer of right hand side: Breadcrumbs and Picker footer. --> 109 <LinearLayout 110 android:layout_width="match_parent" 111 android:layout_height="wrap_content" 112 android:layout_marginTop="@dimen/main_container_section_gap" 113 android:background="@drawable/main_container_bottom_section_background"> 114 115 <com.android.documentsui.HorizontalBreadcrumb 116 android:id="@+id/horizontal_breadcrumb" 117 android:layout_width="match_parent" 118 android:layout_height="wrap_content" 119 android:paddingHorizontal="@dimen/breadcrumb_padding_horizontal" /> 120 121 </LinearLayout> 122 123 <androidx.coordinatorlayout.widget.CoordinatorLayout 124 android:id="@+id/container_save" 125 android:layout_width="match_parent" 126 android:layout_height="wrap_content" 127 android:background="?attr/colorSurfaceContainer" 128 android:elevation="8dp" /> 129 130 </LinearLayout> 131 132 </LinearLayout> 133 134 <!-- Peek overlay --> 135 <FrameLayout 136 android:id="@+id/peek_overlay" 137 android:layout_width="match_parent" 138 android:layout_height="match_parent" 139 android:visibility="gone" /> 140 141</androidx.coordinatorlayout.widget.CoordinatorLayout> 142