Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Drawer is not open & close for some android phone #20

@zawawimanja

Description

@zawawimanja

The code to open drawer is

NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
// navigationView.setNavigationItemSelectedListener(
// new NavigationView.OnNavigationItemSelectedListener() {
// // This method will trigger on item Click of navigation menu
// @OverRide
// public boolean onNavigationItemSelected(MenuItem menuItem) {
// // Set item in checked state
// menuItem.setChecked(true);
//
// // TODO: handle navigation
//
// // Closing drawer on item click
// mDrawerLayout.closeDrawers();
// return true;
// }
// });

//need to replace and using the action bar
//or u can refer this link
https://github.com/google-developer-training/android-fundamentals-apps-v2/tree/master/NavDrawerExperiment

ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, mDrawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
mDrawerLayout.setDrawerListener(toggle);
toggle.syncState();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions