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             <com.android.documentsui.DocumentsToolbar
     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                 <Spinner
     45                     android:id="@+id/stack"
     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             </com.android.documentsui.DocumentsToolbar>
     54 
     55             <include layout="@layout/directory_cluster"/>
     56 
     57         </LinearLayout>
     58 
     59         <LinearLayout
     60             android:id="@+id/drawer_roots"
     61             android:layout_width="256dp"
     62             android:layout_height="match_parent"
     63             android:layout_gravity="start"
     64             android:orientation="vertical"
     65             android:elevation="16dp"
     66             android:background="@color/drawer_background">
     67 
     68             <Toolbar
     69                 android:id="@+id/roots_toolbar"
     70                 android:layout_width="match_parent"
     71                 android:layout_height="?android:attr/actionBarSize"
     72                 android:background="?android:attr/colorPrimary"
     73                 android:elevation="8dp"
     74                 android:theme="?actionBarTheme"
     75                 android:popupTheme="?actionBarPopupTheme" />
     76 
     77             <FrameLayout
     78                 android:id="@+id/container_roots"
     79                 android:layout_width="match_parent"
     80                 android:layout_height="0dp"
     81                 android:layout_weight="1" />
     82 
     83         </LinearLayout>
     84 
     85     </android.support.v4.widget.DrawerLayout>
     86 </android.support.design.widget.CoordinatorLayout>
     87