Home | History | Annotate | Download | only in layout
      1 <!--
      2     Copyright (C) 2015 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 <android.support.v4.widget.DrawerLayout
     17     xmlns:android="http://schemas.android.com/apk/res/android"
     18     android:id="@+id/drawer_layout"
     19     android:layout_width="match_parent"
     20     android:layout_height="match_parent"
     21     android:background="?android:attr/colorPrimaryDark">
     22     <!-- The main content view -->
     23     <LinearLayout
     24         android:id="@+id/content_parent"
     25         android:layout_width="match_parent"
     26         android:layout_height="match_parent"
     27         android:orientation="vertical"
     28         android:fitsSystemWindows="true" >
     29         <FrameLayout
     30             android:layout_width="match_parent"
     31             android:layout_height="wrap_content"
     32             style="?android:attr/actionBarStyle">
     33             <Toolbar
     34                 xmlns:android="http://schemas.android.com/apk/res/android"
     35                 android:id="@+id/action_bar"
     36                 android:layout_width="match_parent"
     37                 android:layout_height="wrap_content"
     38                 android:navigationContentDescription="@*android:string/action_bar_up_description"
     39                 android:theme="?android:attr/actionBarTheme"
     40                 style="?android:attr/toolbarStyle"
     41                 android:background="?android:attr/colorPrimary" />
     42         </FrameLayout>
     43         <FrameLayout
     44             android:id="@+id/content_frame"
     45             android:layout_width="match_parent"
     46             android:layout_height="fill_parent"
     47             android:background="?android:attr/windowBackground" />
     48     </LinearLayout>
     49     <!-- The navigation drawer -->
     50     <ListView android:id="@+id/left_drawer"
     51         android:layout_width="300dp"
     52         android:layout_height="match_parent"
     53         android:layout_gravity="start"
     54         android:choiceMode="singleChoice"
     55         android:divider="@android:color/transparent"
     56         android:dividerHeight="0dp"
     57         android:background="?android:attr/colorBackground" />
     58 </android.support.v4.widget.DrawerLayout>
     59