• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    xmlns:app="http://schemas.android.com/apk/res-auto"
22    android:layout_width="match_parent"
23    android:layout_height="match_parent"
24    android:id="@+id/coordinator_layout">
25
26    <androidx.drawerlayout.widget.DrawerLayout
27        android:id="@+id/drawer_layout"
28        android:layout_width="match_parent"
29        android:layout_height="match_parent">
30
31        <!-- Main container -->
32        <androidx.coordinatorlayout.widget.CoordinatorLayout
33            android:layout_width="match_parent"
34            android:layout_height="match_parent"
35            android:orientation="vertical"
36            android:paddingTop="@dimen/main_container_padding_top"
37            android:background="?attr/colorSurfaceBright">
38
39            <!-- Main list area (file list/grid or search results), full height -->
40            <FrameLayout
41                android:layout_width="match_parent"
42                android:layout_height="match_parent"
43                app:layout_behavior="@string/scrolling_behavior">
44
45                <FrameLayout
46                    android:id="@+id/container_directory"
47                    android:clipToPadding="false"
48                    android:layout_width="match_parent"
49                    android:layout_height="match_parent"
50                    android:layout_weight="1" />
51
52                <FrameLayout
53                    android:id="@+id/container_search_fragment"
54                    android:clipToPadding="false"
55                    android:layout_width="match_parent"
56                    android:layout_height="match_parent" />
57
58                <!-- Drawer edge is a placeholder view used to capture hovering
59                     event on view edge to open the drawer. (b/28345294) -->
60                <View
61                    android:id="@+id/drawer_edge"
62                    android:background="@android:color/transparent"
63                    android:layout_width="@dimen/drawer_edge_width"
64                    android:layout_height="match_parent"/>
65            </FrameLayout>
66
67            <!-- Footer of right hand side: Breadcrumbs and Picker footer. -->
68            <LinearLayout
69                android:id="@+id/bottom_container"
70                android:layout_width="match_parent"
71                android:layout_height="wrap_content"
72                android:orientation="vertical"
73                android:layout_gravity="bottom">
74
75                <com.google.android.material.divider.MaterialDivider
76                    android:id="@+id/breadcrumb_top_divider"
77                    android:layout_width="match_parent"
78                    android:layout_height="wrap_content"
79                    app:dividerColor="?attr/colorSurfaceContainer"
80                    app:dividerThickness="@dimen/main_container_section_gap" />
81
82                <com.android.documentsui.HorizontalBreadcrumb
83                    android:id="@+id/horizontal_breadcrumb"
84                    android:layout_width="match_parent"
85                    android:layout_height="wrap_content"
86                    android:background="?attr/colorSurfaceBright"
87                    android:paddingHorizontal="@dimen/breadcrumb_padding_horizontal" />
88
89                <androidx.coordinatorlayout.widget.CoordinatorLayout
90                    android:id="@+id/container_save"
91                    android:layout_width="match_parent"
92                    android:layout_height="wrap_content"
93                    android:background="?attr/colorSurfaceContainer" />
94
95            </LinearLayout>
96
97            <!-- Top section: toolbar, search chips, profile tab -->
98            <include layout="@layout/directory_app_bar"/>
99
100        </androidx.coordinatorlayout.widget.CoordinatorLayout>
101
102        <!-- Drawer section -->
103        <LinearLayout
104            android:id="@+id/drawer_roots"
105            android:layout_width="256dp"
106            android:layout_height="match_parent"
107            android:layout_gravity="start"
108            android:orientation="vertical">
109
110            <FrameLayout
111                android:id="@+id/container_roots"
112                android:layout_width="match_parent"
113                android:layout_height="0dp"
114                android:layout_weight="1" />
115
116        </LinearLayout>
117
118    </androidx.drawerlayout.widget.DrawerLayout>
119
120    <!-- Peek overlay -->
121    <FrameLayout
122        android:id="@+id/peek_overlay"
123        android:layout_width="match_parent"
124        android:layout_height="match_parent"
125        android:visibility="gone" />
126
127</androidx.coordinatorlayout.widget.CoordinatorLayout>
128