diff --git a/Augendiagnose/src/de/eisfeldj/augendiagnose/util/DialogUtil.java b/Augendiagnose/src/de/eisfeldj/augendiagnose/util/DialogUtil.java index 182cf193..1ecee883 100644 --- a/Augendiagnose/src/de/eisfeldj/augendiagnose/util/DialogUtil.java +++ b/Augendiagnose/src/de/eisfeldj/augendiagnose/util/DialogUtil.java @@ -9,7 +9,6 @@ import android.os.Bundle; import android.text.Html; import android.util.Log; -import android.view.KeyEvent; import android.widget.Toast; import de.eisfeldj.augendiagnose.Application; import de.eisfeldj.augendiagnose.R; @@ -169,18 +168,16 @@ public Dialog onCreateDialog(Bundle savedInstanceState) { public void onClick(DialogInterface dialog, int id) { getActivity().finish(); } - }).setOnKeyListener(new DialogInterface.OnKeyListener() { - @Override - public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_BACK) { - getActivity().finish(); - return true; - } - return false; - } }); + return builder.create(); } + + @Override + public void onDismiss(DialogInterface dialog) { + super.onDismiss(dialog); + getActivity().finish(); + } } /**