diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java index fd94c03a2c..1c3b8ff82e 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java @@ -128,9 +128,10 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm super.onBackPressed(); } }; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - Window window = dialog.getWindow(); - if (window != null) { + Window window = dialog.getWindow(); + if (window != null) { + window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.setStatusBarColor(ContextCompat.getColor(getContext(), R.color.coordinate_input_status_bar_color)); @@ -212,6 +213,10 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm registerEditTexts(); + if (savedInstanceState == null) { + latitudeBox.select(); + } + final View mapMarkersLayout = mainView.findViewById(R.id.map_markers_layout); RecyclerView recyclerView = (RecyclerView) mainView.findViewById(R.id.markers_recycler_view); @@ -321,10 +326,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm stopLocationUpdate(); } - @Override - public void onSaveInstanceState(Bundle outState) { - } - @Override public void onDestroyView() { Dialog dialog = getDialog(); @@ -529,7 +530,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm } else { if (useOsmandKeyboard) { AndroidUtils.hideSoftKeyboard(getActivity(), view); - } else if (isOsmandKeyboardCurrentlyVisible()) { + } else if (orientationPortrait && isOsmandKeyboardCurrentlyVisible()) { changeOsmandKeyboardVisibility(false); } textFieldBox.setHasFocus(false);