0

I'm developing an application with a side navigation menu.

In my activities, the action bar of the activity I'm loading overlays the action bar with the side navigation menu. Even though the side menu is there and works fine.

Home page with the side navigation:

enter image description here

Side navigation works when swiping:

enter image description here

I want to hide or remove the activity's action bar while maintaining the side navigation menu.

This is the code from the onCreate() method

FrameLayout contentFrameLayout = (FrameLayout) findViewById(R.id.content_frame); 
            getLayoutInflater().inflate(R.layout.activity_complaint, contentFrameLayout);
DavidG
  • 24,279
  • 14
  • 89
  • 82
BlackExS
  • 1
  • 1

2 Answers2

0

you can do 2 things

  1. you can provide padding to the side navigation menu , so that the side navigation menu will be displayed just below the action bar

  2. another thing you can do is to hide the Action bar when Navigation Drawer icon is clicked

the code to hide Action bar is below

android.support.v7.app.ActionBar AB= getSupportActionBar();
AB.hide();
0

I found a solution using the answer from this question:

How to Display Navigation Drawer in all activities?

and adding this bit of code to my activity in the Manifest.xml file

android:theme="@style/AppTheme.NoActionBar"
Community
  • 1
  • 1
BlackExS
  • 1
  • 1