0

I want to hide the three-dot menu item when the navigationbar appears.
I found some nice topics how to hide the three-dot menu item:
How to disable/hide three-dot indicator(Option menu indicator) on ICS handsets
How do I hide a menu item in the actionbar?
But I can not find a solution for my problem. I hope for some help. :)

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater menuInflater = getMenuInflater();
    menuInflater.inflate(R.menu.main_menu, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    infoDialogFragment.aboutMenuItem(this);
    return false;
}

@Override
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
    super.onPostCreate(savedInstanceState);
    actionBarDrawerToggle.syncState();
}


private void setNavigationDrawer() {
    navigationView.setNavigationItemSelectedListener(menuItem -> {


    });
    return false;
}
Community
  • 1
  • 1
Sarah Pöhler
  • 550
  • 1
  • 7
  • 18

1 Answers1

0

Delete all of this codes from your activity:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater menuInflater = getMenuInflater();
    menuInflater.inflate(R.menu.main_menu, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    infoDialogFragment.aboutMenuItem(this);
    return false;
}
Mahdi Astanei
  • 1,905
  • 1
  • 17
  • 30