diff --git a/OsmAnd/res/layout/fragment_edit_poi.xml b/OsmAnd/res/layout/fragment_edit_poi.xml index 8b842aee23..e177428eca 100644 --- a/OsmAnd/res/layout/fragment_edit_poi.xml +++ b/OsmAnd/res/layout/fragment_edit_poi.xml @@ -47,7 +47,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/poi_dialog_name" - android:imeOptions="actionSend" + android:imeOptions="actionNext" android:inputType="text" tools:text="@string/lorem_ipsum"/> diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java index 931b87876e..31f71b76e4 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java @@ -189,12 +189,11 @@ public class EditPoiDialogFragment extends DialogFragment { Uri.parse("https://wiki.openstreetmap.org/wiki/Map_Features"))); } }); - onlineDocumentationButton.setImageDrawable( - getMyApplication().getIconsCache() - .getPaintedContentIcon(R.drawable.ic_action_help, - getResources().getColor( - isLightTheme ? R.color.inactive_item_orange - : R.color.dash_search_icon_dark))); + + final int colorId = isLightTheme ? R.color.inactive_item_orange : R.color.dash_search_icon_dark; + final int color = getResources().getColor(colorId); + onlineDocumentationButton.setImageDrawable(getMyApplication().getIconsCache() + .getPaintedContentIcon(R.drawable.ic_action_help, color)); final ImageButton poiTypeButton = (ImageButton) view.findViewById(R.id.poiTypeButton); poiTypeButton.setOnClickListener(new View.OnClickListener() { @Override @@ -268,6 +267,14 @@ public class EditPoiDialogFragment extends DialogFragment { return view; } + @NonNull + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + final Dialog dialog = super.onCreateDialog(savedInstanceState); + dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); + return dialog; + } + private void save() { if (TextUtils.isEmpty(poiTypeEditText.getText())) { poiTypeEditText.setError(getResources().getString(R.string.please_specify_poi_type)); @@ -355,7 +362,7 @@ public class EditPoiDialogFragment extends DialogFragment { public static EditPoiDialogFragment createAddPoiInstance(double latitude, double longitude, - OsmandApplication application) { + OsmandApplication application) { Node node = new Node(latitude, longitude, -1); Amenity amenity; amenity = new Amenity(); @@ -600,6 +607,7 @@ public class EditPoiDialogFragment extends DialogFragment { return handled; } }; + public interface OnFragmentActivatedListener { void onFragmentActivated(); }