use of org.fossasia.openevent.core.location.LocationsFragment in project open-event-android by fossasia.
the class MainActivity method doMenuAction.
private void doMenuAction(int menuItemId) {
Intent intent;
currentMenuItemId = menuItemId;
switch(menuItemId) {
case R.id.nav_home:
replaceFragment(AboutFragment.newInstance(onMapSelectedListener), R.string.menu_home);
break;
case R.id.nav_discount_code:
replaceFragment(new DiscountCodeFragment(), R.string.discount_code);
break;
case R.id.nav_notification:
replaceFragment(NotificationsFragment.getInstance(), R.string.menu_notification);
break;
case R.id.nav_tracks:
replaceFragment(new TracksFragment(), R.string.menu_tracks);
break;
case R.id.nav_feed:
replaceFragment(FeedFragment.getInstance(), R.string.menu_feed);
break;
case R.id.nav_schedule:
replaceFragment(new ScheduleFragment(), R.string.menu_schedule);
break;
case R.id.nav_speakers:
replaceFragment(new SpeakersListFragment(), R.string.menu_speakers);
break;
case R.id.nav_sponsors:
replaceFragment(new SponsorsFragment(), R.string.menu_sponsor);
break;
case R.id.nav_locations:
replaceFragment(new LocationsFragment(), R.string.menu_locations);
break;
case R.id.nav_faqs:
replaceFragment(new FAQFragment(), R.string.menu_faqs);
break;
case R.id.nav_map:
Bundle bundle = new Bundle();
bundle.putBoolean(ConstantStrings.IS_MAP_FRAGMENT_FROM_MAIN_ACTIVITY, true);
Fragment mapFragment = StrategyRegistry.getInstance().getMapModuleStrategy().getMapModuleFactory().provideMapModule().provideMapFragment();
mapFragment.setArguments(bundle);
replaceFragment(mapFragment, R.string.menu_map);
break;
case R.id.nav_user_profile:
intent = new Intent(MainActivity.this, UserProfileActivity.class);
startActivity(intent);
break;
case R.id.nav_settings:
intent = new Intent(MainActivity.this, SettingsActivity.class);
startActivity(intent);
break;
case R.id.nav_share:
shareApplication();
break;
default:
}
}
Aggregations