Navigation Drawer icon in action bar not working

Solution for Navigation Drawer icon in action bar not working
is Given Below:

The Action bar icon for navigation drawer not displaying the menu, but when I swipe my finger over the activity screen from the left edge, then the menu appears which means there is nothing wrong with the actual menu. Just the action bar icon for navigation drawer not working. I used the default navigation drawer activity and then modified it.

The problem is in the onOptionsItemSelected method. If I comment that method, then navigation drawer icon works properly. But if I do not remove that method, then navigation icon dose not working.

Please help me.

Below is the code of that activity.

    public class MainDashboard extends AppCompatActivity {
    FirebaseAuth firebaseAuth;
    FirebaseUser firebaseUser;
    Context context;
    DrawerLayout drawerLayout;
    NavigationView navigationView;
    private AppBarConfiguration mAppBarConfiguration;
    private ActivityMainDashboardBinding binding;

 @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        firebaseAuth = FirebaseAuth.getInstance();
        firebaseUser = firebaseAuth.getCurrentUser();
        context =MainDashboard.this;

        binding = ActivityMainDashboardBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

 setSupportActionBar(binding.appBarMainDashboard.toolbar);
        DrawerLayout drawer = binding.drawerLayout;
        NavigationView navigationView = binding.navView;

        // Passing each menu ID as a set of Ids because each
        // menu should be considered as top level destinations.
        mAppBarConfiguration = new AppBarConfiguration.Builder(
                R.id.nav_ebooks, R.id.nav_videoLectures, R.id.nav_tipsAndTricks,R.id.nav_contactUs)
                .setDrawerLayout(drawer)
                .build();
        NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_content_main_dashboard);
        NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
        NavigationUI.setupWithNavController(navigationView, navController);
    }

private void showLogoutDialog() {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setMessage("Are you sure want to logout?").setPositiveButton("Yes, Logout.", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                //logout here.
                firebaseAuth.signOut();//end the session
                startActivity(new Intent(getApplicationContext(),MainActivity.class));
            }
        }).setNegativeButton("No!", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        AlertDialog alertDialog = builder.create();
        alertDialog.show();
    }
//Inflate Option menu 
@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main_dashboard, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(@NonNull MenuItem item) {
        int item_id = item.getItemId();
        if(item_id == R.id.option_profile)
        {
            startActivity(new Intent(getApplicationContext(),UserProfile.class));
        }
        else if(item_id == R.id.option_logout)
        {
            showLogoutDialog();
        }
        return true;
    }

    @Override
    public boolean onSupportNavigateUp() {
        NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_content_main_dashboard);
        return NavigationUI.navigateUp(navController, mAppBarConfiguration)
                || super.onSupportNavigateUp();
    }
}