36 lines
1.4 KiB
XML
36 lines
1.4 KiB
XML
<android.support.v4.widget.DrawerLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/drawer_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<!-- As the main content view, the view below consumes the entire
|
|
space available using match_parent in both dimensions. -->
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:id="@+id/container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context="de.marcelkapfer.myfirstapp.MainActivity"
|
|
tools:ignore="MergeRootFrame" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- android:layout_gravity="start" tells DrawerLayout to treat
|
|
this as a sliding drawer on the left side for left-to-right
|
|
languages and on the right side for right-to-left languages.
|
|
The drawer is given a fixed width in dp and extends the full height of
|
|
the container. A solid background is used for contrast
|
|
with the content view. -->
|
|
<ListView
|
|
android:id="@+id/left_drawer"
|
|
android:layout_width="300dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="start"
|
|
android:choiceMode="singleChoice"
|
|
android:divider="@android:color/transparent"
|
|
android:dividerHeight="0dp"
|
|
android:background="#fff"/>
|
|
</android.support.v4.widget.DrawerLayout> |