Here my navigation drawer is above toolbar.I also added some xml code.Please help me.
here is my activity.xml
certainly android:layout_marginTop="?attr/actionBarSize" do the job in
But the problem is drawerlayout is top of the toolbar. That is why the fading here. you can remove fading by
mDrawerLayout.setScrimColor(getResources().getColor(android.R.color.transparent));
But on some devices it may look wired.
When working with Android studio. We can create NavigationDrawerActiviity
There are 3 files named
activity_main.xml
app_bar_main.xml
nav_header_main.xml
content_main.xml
So we can skip app_bar_main.xml and we can remove the fading.
Make the root view of the activity main as Vertical LinearLayout
In activity_main.xml add DrawerLayout and include content_main.xml in DrawerLayout. and Add AppBarLayout above the DrawerLayout.
add and replace setContentView() of NavigationDrawerActiviity to
setContentView(R.layout.activity_main);
Finally we have