Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2013 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 <android.support.design.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 
     25     <android.support.v4.widget.DrawerLayout
     26         android:id="@+id/drawer_layout"
     27         android:layout_width="match_parent"
     28         android:layout_height="match_parent">
     29 
     30         <LinearLayout
     31             android:layout_width="match_parent"
     32             android:layout_height="match_parent"
     33             android:orientation="vertical">
     34 
     35             <Toolbar
     36                 android:id="@+id/toolbar"
     37                 android:layout_width="match_parent"
     38                 android:layout_height="?android:attr/actionBarSize"
     39                 android:background="?android:attr/colorPrimary"
     40                 android:elevation="8dp"
     41                 android:theme="?actionBarTheme"
     42                 android:popupTheme="?actionBarPopupTheme">
     43 
     44                 <com.android.documentsui.DropdownBreadcrumb
     45                     android:id="@+id/dropdown_breadcrumb"
     46                     android:layout_width="wrap_content"
     47                     android:layout_height="wrap_content"
     48                     android:layout_marginStart="4dp"
     49                     android:popupTheme="?actionBarPopupTheme"
     50                     android:background="@android:color/transparent"
     51                     android:overlapAnchor="true" />
     52 
     53             </Toolbar>
     54 
     55             <FrameLayout
     56                 android:layout_width="match_parent"
     57                 android:layout_height="match_parent">
     58 
     59                 <include layout="@layout/directory_cluster"/>
     60 
     61                 <!-- Drawer edge is a dummy view used to capture hovering event
     62                      on view edge to open the drawer. (b/28345294) -->
     63                 <View
     64                     android:id="@+id/drawer_edge"
     65                     android:background="@android:color/transparent"
     66                     android:layout_width="@dimen/drawer_edge_width"
     67                     android:layout_height="match_parent"/>
     68             </FrameLayout>
     69 
     70         </LinearLayout>
     71 
     72         <LinearLayout
     73             android:id="@+id/drawer_roots"
     74             android:layout_width="256dp"
     75             android:layout_height="match_parent"
     76             android:layout_gravity="start"
     77             android:orientation="vertical"
     78             android:elevation="16dp"
     79             android:background="@color/drawer_background">
     80 
     81             <Toolbar
     82                 android:id="@+id/roots_toolbar"
     83                 android:layout_width="match_parent"
     84                 android:layout_height="?android:attr/actionBarSize"
     85                 android:background="?android:attr/colorPrimary"
     86                 android:elevation="8dp"
     87                 android:theme="?actionBarTheme"
     88                 android:popupTheme="?actionBarPopupTheme" />
     89 
     90             <FrameLayout
     91                 android:id="@+id/container_roots"
     92                 android:layout_width="match_parent"
     93                 android:layout_height="0dp"
     94                 android:layout_weight="1" />
     95 
     96         </LinearLayout>
     97 
     98     </android.support.v4.widget.DrawerLayout>
     99 </android.support.design.widget.CoordinatorLayout>
    100