use of co.mobiwise.sample.fragment.GravityFragment in project MaterialIntroView by iammert.
the class ToolbarMenuItemActivity method onNavigationItemSelected.
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
switch(item.getItemId()) {
case R.id.nav_demo:
getSupportFragmentManager().beginTransaction().replace(R.id.container, new MainFragment()).commit();
break;
case R.id.nav_gravity:
getSupportFragmentManager().beginTransaction().replace(R.id.container, new GravityFragment()).commit();
break;
case R.id.nav_focus:
getSupportFragmentManager().beginTransaction().replace(R.id.container, new FocusFragment()).commit();
break;
case R.id.nav_recyclerview:
getSupportFragmentManager().beginTransaction().replace(R.id.container, new RecyclerviewFragment()).commit();
break;
case R.id.nav_toolbar:
startActivity(new Intent(getApplicationContext(), ToolbarMenuItemActivity.class));
break;
case R.id.nav_tab:
break;
default:
break;
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
use of co.mobiwise.sample.fragment.GravityFragment in project MaterialIntroView by iammert.
the class MainActivity method onNavigationItemSelected.
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
switch(item.getItemId()) {
case R.id.nav_demo:
getSupportFragmentManager().beginTransaction().replace(R.id.container, new MainFragment()).commit();
break;
case R.id.nav_gravity:
getSupportFragmentManager().beginTransaction().replace(R.id.container, new GravityFragment()).commit();
break;
case R.id.nav_focus:
getSupportFragmentManager().beginTransaction().replace(R.id.container, new FocusFragment()).commit();
break;
case R.id.nav_recyclerview:
getSupportFragmentManager().beginTransaction().replace(R.id.container, new RecyclerviewFragment()).commit();
break;
case R.id.nav_toolbar:
startActivity(new Intent(getApplicationContext(), ToolbarMenuItemActivity.class));
break;
case R.id.nav_tab:
break;
default:
break;
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
Aggregations