In my application when the user clicks on the application logo or title, system will open the navigation drawer. I want to make the navigation drawer to be open only if the navigation icon clicked, as i want to do some other logic if the user clicks application logo and title. How to perform that ?
This code is intended to open navigation drawer upon clicking application logo, title or navigation icon.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// toggle nav drawer on selecting action bar app icon/title
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}
// Handle action bar actions click
switch (item.getItemId()) {
case R.id.action_settings:
return true;
default:
return super.onOptionsItemSelected(item);
//return false;
}
}
Any advice is appreciated