use of de.symeda.sormas.app.BaseActivity in project SORMAS-Project by hzi-braunschweig.
the class CaseEditTreatmentListFragment method onCreate.
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((BaseActivity) getActivity()).showPreloader();
adapter = new TreatmentListAdapter();
TreatmentListViewModel model = ViewModelProviders.of(this).get(TreatmentListViewModel.class);
model.initializeViewModel(getActivityRootData().getTherapy());
model.getTreatments().observe(this, treatments -> {
((BaseActivity) getActivity()).hidePreloader();
adapter.submitList(treatments);
updateEmptyListHint(treatments);
});
}
use of de.symeda.sormas.app.BaseActivity in project SORMAS-Project by hzi-braunschweig.
the class CaseEditEventListFragment method onCreate.
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((BaseActivity) getActivity()).showPreloader();
adapter = new EventListAdapter();
EventListViewModel model = ViewModelProviders.of(this).get(EventListViewModel.class);
model.initializeViewModel(getActivityRootData());
model.getEvents().observe(this, events -> {
((CaseEditActivity) getActivity()).hidePreloader();
adapter.submitList(events);
updateEmptyListHint(events);
});
}
use of de.symeda.sormas.app.BaseActivity in project SORMAS-Project by hzi-braunschweig.
the class CaseEditImmunizationListFragment method onCreate.
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((BaseActivity) getActivity()).showPreloader();
adapter = new ImmunizationListAdapter();
ImmunizationListViewModel model = ViewModelProviders.of(this).get(ImmunizationListViewModel.class);
model.initializeViewModel(getActivityRootData());
model.getImmunizationList().observe(this, immunizations -> {
((CaseEditActivity) getActivity()).hidePreloader();
adapter.submitList(immunizations);
updateEmptyListHint(immunizations);
});
}
use of de.symeda.sormas.app.BaseActivity in project SORMAS-Project by hzi-braunschweig.
the class CaseEditPrescriptionListFragment method onCreate.
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((BaseActivity) getActivity()).showPreloader();
adapter = new PrescriptionListAdapter();
PrescriptionListViewModel model = ViewModelProviders.of(this).get(PrescriptionListViewModel.class);
model.initializeViewModel(getActivityRootData().getTherapy());
model.getPrescriptions().observe(this, prescriptions -> {
((BaseActivity) getActivity()).hidePreloader();
adapter.submitList(prescriptions);
updateEmptyListHint(prescriptions);
});
}
use of de.symeda.sormas.app.BaseActivity in project SORMAS-Project by hzi-braunschweig.
the class CaseReadPrescriptionListFragment method onCreate.
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((BaseActivity) getActivity()).showPreloader();
adapter = new PrescriptionListAdapter();
PrescriptionListViewModel model = ViewModelProviders.of(this).get(PrescriptionListViewModel.class);
model.initializeViewModel(getActivityRootData().getTherapy());
model.getPrescriptions().observe(this, prescriptions -> {
((BaseActivity) getActivity()).hidePreloader();
adapter.submitList(prescriptions);
updateEmptyListHint(prescriptions);
});
}
Aggregations