public static Intent getBottomNavigationIntent(final Activity fromActivity, final int id) {
        if (id == MENU_MAP) {
            return DefaultMap.getLiveMapIntent(fromActivity);
        } else if (id == MENU_LIST) {
            return CacheListActivity.getActivityOfflineIntent(fromActivity);
        } else if (id == MENU_SEARCH) {
            return new Intent(fromActivity, SearchActivity.class);
        } else if (id == MENU_CUSTOM) {
            return CacheListActivity.getNearestIntent(fromActivity);
        } else if (id == MENU_HOME) {
            return new Intent(fromActivity, MainActivity.class);
        } else {
            throw new IllegalStateException("unknown navigation item selected"); // should never happen
        }
    }
@return the menu item id which should be selected
main/src/main/java/cgeo/geocaching/activity/AbstractNavigationBarActivity.java