use of com.thebluealliance.androidclient.listitems.NavDrawerItem in project the-blue-alliance-android by the-blue-alliance.
the class NavigationDrawerFragment method navigationItemClicked.
/**
* Called when an item in the navigation drawer is clicked
*
* @param position The position of the clicked item
*/
private void navigationItemClicked(int position) {
ListItem item = mNavigationAdapter.getItem(position);
// Ignore clicks on items like dividers and spacers
if (!(item instanceof NavDrawerItem)) {
return;
}
if (mDrawerListView != null) {
mDrawerListView.setItemChecked(position, true);
}
mListener.onNavDrawerItemClicked((NavDrawerItem) item);
if (mDrawerLayout != null) {
mDrawerLayout.closeDrawer(mFragmentContainerView);
}
}
Aggregations