From 693357a9ae96a460af482e664becdac6da41f502 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Mon, 30 Oct 2017 15:55:06 +0200 Subject: [PATCH] Clear inputs after adding marker --- .../mapmarkers/CoordinateInputDialogFragment.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java index 60c17d979f..633fd04c51 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java @@ -645,6 +645,17 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm mapMarker.nextKey = MapMarkersDbHelper.TAIL_NEXT_VALUE; mapMarkers.add(mapMarker); adapter.notifyDataSetChanged(); + clearInputs(); + ((OsmandTextFieldBoxes) mainView.findViewById(R.id.latitude_box)).select(); + } + + private void clearInputs() { + for (ExtendedEditText editText : extendedEditTexts) { + editText.setText(""); + } + for (OsmandTextFieldBoxes osmandTextFieldBox : textFieldBoxes) { + osmandTextFieldBox.deactivate(); + } } private MapActivity getMapActivity() {