0

I have looked and couldn't find the back icon used by the drawer so I couldn't just replace the icon or the name. Here is my code:

public class Homescreen extends AppCompatActivity
        implements NavigationView.OnNavigationItemSelectedListener {

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

        setContentView(R.layout.activity_homescreen);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);


        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_open);

        drawer.setDrawerListener(toggle);
        toggle.syncState();

        NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
        navigationView.setNavigationItemSelectedListener(this);


    }
seekingStillness
  • 4,833
  • 5
  • 38
  • 68
newToEverything
  • 309
  • 4
  • 13
  • @Dan I don't have this class anywhere and I also can't implement it: drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, getToolbar(), R.string.open, R.string.close) { – newToEverything Apr 15 '17 at 21:39
  • I'm not sure what you're saying, but you have that class right here: `ActionBarDrawerToggle toggle = ...`. They're just using a different variable name. Anyway, if you don't want the animation, and you don't want to provide your own hamburger icon, then just don't set the toggle as a `DrawerListener` on the `DrawerLayout`. That is, remove this line: `drawer.setDrawerListener(toggle);`. – Mike M. Apr 16 '17 at 02:11

0 Answers0