From fb0291d6044fe760a69b3a3c9dea811e86f8c27c Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Mon, 30 Oct 2017 15:39:02 +0200 Subject: [PATCH] Show osmand keyboard on tap --- .../mapmarkers/CoordinateInputDialogFragment.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java index 1c3b8ff82e..60c17d979f 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java @@ -346,8 +346,12 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm View.OnTouchListener textFieldBoxOnTouchListener = new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { - if (orientationPortrait && !useOsmandKeyboard && isOsmandKeyboardCurrentlyVisible()) { - changeOsmandKeyboardVisibility(false); + if (orientationPortrait) { + if (!useOsmandKeyboard && isOsmandKeyboardCurrentlyVisible()) { + changeOsmandKeyboardVisibility(false); + } else if (useOsmandKeyboard && !isOsmandKeyboardCurrentlyVisible()) { + changeOsmandKeyboardVisibility(true); + } } return false; } @@ -429,6 +433,9 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm @Override public boolean onTouch(View view, MotionEvent motionEvent) { if (useOsmandKeyboard) { + if (orientationPortrait && !isOsmandKeyboardCurrentlyVisible()) { + changeOsmandKeyboardVisibility(true); + } EditText editText = (EditText) view; int inType = editText.getInputType(); // Backup the input type editText.setInputType(InputType.TYPE_NULL); // Disable standard keyboard