Search in sources :

Example 1 with SponsorsFragment

use of org.fossasia.openevent.core.sponsor.SponsorsFragment 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:
    }
}
Also used : DiscountCodeFragment(org.fossasia.openevent.core.discount.DiscountCodeFragment) LocationsFragment(org.fossasia.openevent.core.location.LocationsFragment) ScheduleFragment(org.fossasia.openevent.core.schedule.ScheduleFragment) FAQFragment(org.fossasia.openevent.core.faqs.FAQFragment) TracksFragment(org.fossasia.openevent.core.track.TracksFragment) Bundle(android.os.Bundle) Intent(android.content.Intent) SpeakersListFragment(org.fossasia.openevent.core.speaker.SpeakersListFragment) Fragment(android.support.v4.app.Fragment) LocationsFragment(org.fossasia.openevent.core.location.LocationsFragment) SponsorsFragment(org.fossasia.openevent.core.sponsor.SponsorsFragment) TracksFragment(org.fossasia.openevent.core.track.TracksFragment) DiscountCodeFragment(org.fossasia.openevent.core.discount.DiscountCodeFragment) ScheduleFragment(org.fossasia.openevent.core.schedule.ScheduleFragment) AboutFragment(org.fossasia.openevent.core.about.AboutFragment) FAQFragment(org.fossasia.openevent.core.faqs.FAQFragment) NotificationsFragment(org.fossasia.openevent.core.notifications.NotificationsFragment) FeedFragment(org.fossasia.openevent.core.feed.FeedFragment) SpeakersListFragment(org.fossasia.openevent.core.speaker.SpeakersListFragment) UserProfileActivity(org.fossasia.openevent.core.auth.profile.UserProfileActivity) SettingsActivity(org.fossasia.openevent.core.settings.SettingsActivity) SponsorsFragment(org.fossasia.openevent.core.sponsor.SponsorsFragment)

Aggregations

Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 Fragment (android.support.v4.app.Fragment)1 AboutFragment (org.fossasia.openevent.core.about.AboutFragment)1 UserProfileActivity (org.fossasia.openevent.core.auth.profile.UserProfileActivity)1 DiscountCodeFragment (org.fossasia.openevent.core.discount.DiscountCodeFragment)1 FAQFragment (org.fossasia.openevent.core.faqs.FAQFragment)1 FeedFragment (org.fossasia.openevent.core.feed.FeedFragment)1 LocationsFragment (org.fossasia.openevent.core.location.LocationsFragment)1 NotificationsFragment (org.fossasia.openevent.core.notifications.NotificationsFragment)1 ScheduleFragment (org.fossasia.openevent.core.schedule.ScheduleFragment)1 SettingsActivity (org.fossasia.openevent.core.settings.SettingsActivity)1 SpeakersListFragment (org.fossasia.openevent.core.speaker.SpeakersListFragment)1 SponsorsFragment (org.fossasia.openevent.core.sponsor.SponsorsFragment)1 TracksFragment (org.fossasia.openevent.core.track.TracksFragment)1