use of de.symeda.sormas.app.event.EventSection in project SORMAS-Project by hzi-braunschweig.
the class EventEditActivity method buildEditFragment.
@Override
protected BaseEditFragment buildEditFragment(PageMenuItem menuItem, Event activityRootData) {
EventSection section = EventSection.fromOrdinal(menuItem.getPosition());
BaseEditFragment fragment;
switch(section) {
case EVENT_INFO:
fragment = EventEditFragment.newInstance(activityRootData);
break;
case EVENT_PARTICIPANTS:
fragment = EventEditPersonsInvolvedListFragment.newInstance(activityRootData);
break;
case TASKS:
fragment = EventEditTaskListFragment.newInstance(activityRootData);
break;
default:
throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
}
return fragment;
}
use of de.symeda.sormas.app.event.EventSection in project SORMAS-Project by hzi-braunschweig.
the class EventReadActivity method goToEditView.
@Override
public void goToEditView() {
EventSection section = EventSection.fromOrdinal(getActivePage().getPosition());
EventEditActivity.startActivity(this, getRootUuid(), section);
}
use of de.symeda.sormas.app.event.EventSection in project SORMAS-Project by hzi-braunschweig.
the class EventReadActivity method buildReadFragment.
@Override
protected BaseReadFragment buildReadFragment(PageMenuItem menuItem, Event activityRootData) {
EventSection section = EventSection.fromOrdinal(menuItem.getPosition());
BaseReadFragment fragment;
switch(section) {
case EVENT_INFO:
fragment = EventReadFragment.newInstance(activityRootData);
break;
case EVENT_PARTICIPANTS:
fragment = EventReadPersonsInvolvedListFragment.newInstance(activityRootData);
break;
case TASKS:
fragment = EventReadTaskListFragment.newInstance(activityRootData);
break;
default:
throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
}
return fragment;
}
Aggregations