use of de.symeda.sormas.app.databinding.DialogClassificationRulesLayoutBinding in project SORMAS-Project by hzi-braunschweig.
the class CaseEditFragment method setUpButtonListeners.
private void setUpButtonListeners(FragmentCaseEditLayoutBinding contentBinding) {
contentBinding.referCaseFromPoe.setOnClickListener(e -> {
final CaseEditActivity activity = (CaseEditActivity) CaseEditFragment.this.getActivity();
activity.saveData(caze -> {
final Case caseClone = (Case) caze.clone();
final ReferCaseFromPoeDialog referCaseFromPoeDialog = new ReferCaseFromPoeDialog(BaseActivity.getActiveActivity(), caze);
referCaseFromPoeDialog.setPositiveCallback(() -> {
record = caseClone;
requestLayoutRebind();
});
referCaseFromPoeDialog.show();
});
});
contentBinding.showClassificationRules.setOnClickListener(v -> {
final InfoDialog classificationDialog = new InfoDialog(CaseEditFragment.this.getContext(), R.layout.dialog_classification_rules_layout, null);
WebView classificationView = ((DialogClassificationRulesLayoutBinding) classificationDialog.getBinding()).content;
classificationView.loadData(DiseaseClassificationAppHelper.buildDiseaseClassificationHtml(record.getDisease()), "text/html", "utf-8");
classificationDialog.show();
});
}
Aggregations