2

Actually I was using One MainActivity and multiple Fragments attached to it. I want to change Navigation Drawer Menu Icon of toolbar from certain fragments as back icon.And set back pressed event for that icon. here is my code

 drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
            this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();
Uma Achanta
  • 3,669
  • 4
  • 22
  • 49

0 Answers0