I want my drawer to open on the left under the toolbar. But, according to aspects of Material Design, this is not very good. But still I want to do it.
Here I have changed my xml file.
--- Relative layout
----- Toolbar
----- Box
------- container
------- box list
here is my xml file. When the application opens, my application crashes. I do not know where I made a mistake, and XML does not show any errors.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <include android:id="@+id/toolbar" layout="@layout/toolbar" /> <android.support.v4.widget.DrawerLayout xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/container_body" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" /> <fragment android:id="@+id/fragment_navigation_drawer" android:name="com.myApp.activity.FragmentDrawer" android:layout_width="@dimen/nav_drawer_width" android:layout_height="match_parent" android:layout_gravity="start" app:layout="@layout/fragment_navigation_drawer" tools:layout="@layout/fragment_navigation_drawer" /> </android.support.v4.widget.DrawerLayout> </RelativeLayout>
android android-layout xml android-5.0-lollipop material-design
Ashish Kudale Jun 25 '15 at 20:04 2015-06-25 20:04
source share