diff --git a/OsmAnd/res/layout/coordinate_input_land_map_markers_list.xml b/OsmAnd/res/layout/coordinate_input_land_map_markers_list.xml index e9a2e62df9..1189246562 100644 --- a/OsmAnd/res/layout/coordinate_input_land_map_markers_list.xml +++ b/OsmAnd/res/layout/coordinate_input_land_map_markers_list.xml @@ -22,7 +22,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" osmand:cardUseCompatPadding="true" - osmand:cardCornerRadius="8dp"> + osmand:cardCornerRadius="2dp"> #4b62e3 #121733 #e6e6e6 - #1f2326 + #2a2f33 #4257c9 #1b224d diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java index d83c0a4870..82a27a9f9a 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/CoordinateInputDialogFragment.java @@ -95,7 +95,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm private boolean goToNextField; private int accuracy = 4; private List textFieldBoxes; - private List inputEditTexts; private View mainView; private IconsCache iconsCache; private Location location; @@ -208,14 +207,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm registerTextFieldBoxes(); - inputEditTexts = new ArrayList<>(); - final EditText latitudeEditText = (EditText) mainView.findViewById(R.id.latitude_edit_text); - inputEditTexts.add(latitudeEditText); - final EditText longitudeEditText = (EditText) mainView.findViewById(R.id.longitude_edit_text); - inputEditTexts.add(longitudeEditText); - final EditText nameEditText = (EditText) mainView.findViewById(R.id.name_edit_text); - inputEditTexts.add(nameEditText); - registerInputEditTexts(); if (savedInstanceState == null) { @@ -527,13 +518,14 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm } }; - for (EditText inputEditText : inputEditTexts) { - if (inputEditText.getId() != R.id.name_edit_text) { - inputEditText.addTextChangedListener(textWatcher); + for (OsmandTextFieldBoxes textFieldBox : textFieldBoxes) { + EditText editText = textFieldBox.getEditText(); + if (editText.getId() != R.id.name_edit_text) { + editText.addTextChangedListener(textWatcher); } - inputEditText.setOnTouchListener(inputEditTextOnTouchListener); - inputEditText.setOnLongClickListener(inputEditTextOnLongClickListener); - inputEditText.setOnEditorActionListener(inputTextViewOnEditorActionListener); + editText.setOnTouchListener(inputEditTextOnTouchListener); + editText.setOnLongClickListener(inputEditTextOnLongClickListener); + editText.setOnEditorActionListener(inputTextViewOnEditorActionListener); } changeInputEditTextHints(); @@ -586,8 +578,9 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm } private void changeEditTextSelections() { - for (EditText inputEditText : inputEditTexts) { - inputEditText.setSelection(inputEditText.getText().length()); + for (OsmandTextFieldBoxes textFieldBox : textFieldBoxes) { + EditText editText = textFieldBox.getEditText(); + editText.setSelection(editText.getText().length()); } }