Hide osmand keyboard on back press

This commit is contained in:
alex 2018-02-21 14:33:00 +02:00
parent d97b723422
commit 66c5cda23e

View file

@ -126,9 +126,13 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
Dialog dialog = new Dialog(ctx, getTheme()) { Dialog dialog = new Dialog(ctx, getTheme()) {
@Override @Override
public void onBackPressed() { public void onBackPressed() {
if (isOsmandKeyboardCurrentlyVisible()) {
changeOsmandKeyboardVisibility(false);
} else {
saveMarkers(); saveMarkers();
super.onBackPressed(); super.onBackPressed();
} }
}
}; };
Window window = dialog.getWindow(); Window window = dialog.getWindow();
if (window != null) { if (window != null) {