From 943f00a018afe046bad97cefcf204e2939260f53 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 2 Sep 2020 13:36:24 +0300 Subject: [PATCH] ui fixes started --- OsmAnd/res/layout/point_editor_fragment_new.xml | 9 +++++++-- OsmAnd/res/values/dimens.xml | 1 + .../mapcontextmenu/editors/PointEditorFragmentNew.java | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/layout/point_editor_fragment_new.xml b/OsmAnd/res/layout/point_editor_fragment_new.xml index e39a1dbf44..8ac753afc0 100644 --- a/OsmAnd/res/layout/point_editor_fragment_new.xml +++ b/OsmAnd/res/layout/point_editor_fragment_new.xml @@ -150,7 +150,7 @@ + + 1.2 5dp + 42dp \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java index 4cf98456be..fd1e47e5b2 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java @@ -38,6 +38,7 @@ import androidx.fragment.app.FragmentActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import net.osmand.AndroidUtils; @@ -273,8 +274,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment { if (addressCaption.getVisibility() != View.VISIBLE) { addressCaption.setVisibility(View.VISIBLE); addAddressBtn.setText(view.getResources().getString(R.string.delete_address)); - View addressEdit = view.findViewById(R.id.address_edit); + TextInputEditText addressEdit = view.findViewById(R.id.address_edit); addressEdit.requestFocus(); + addressEdit.setSelection(addressEdit.getText().length()); AndroidUtils.softKeyboardDelayed(requireActivity(),addressEdit); } else { addressCaption.setVisibility(View.GONE);