Closed ali-bagheri closed 5 years ago
same link drawer layout from support library, you may implement NavigationView.OnNavigationItemSelectedListener class and override below code,
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
drawer.closeDrawer(GravityCompat.START);
return true;
}
@Override public boolean onNavigationItemSelected(MenuItem item) { if(item.getItemId()){ //do something } drawer.closeDrawer(GravityCompat.START); return true; }
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
How can set click method for menu item without use android:onClick=""?