Fix long press

This commit is contained in:
PavelRatushny 2017-11-02 15:55:26 +02:00
parent c399209855
commit 0443bdfeb1

View file

@ -403,6 +403,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
View.OnLongClickListener inputEditTextOnLongClickListener = new View.OnLongClickListener() { View.OnLongClickListener inputEditTextOnLongClickListener = new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(final View view) { public boolean onLongClick(final View view) {
if (useOsmandKeyboard || !orientationPortrait) {
final EditText inputEditText = (EditText) view; final EditText inputEditText = (EditText) view;
PopupMenu popupMenu = new PopupMenu(getContext(), inputEditText); PopupMenu popupMenu = new PopupMenu(getContext(), inputEditText);
Menu menu = popupMenu.getMenu(); Menu menu = popupMenu.getMenu();
@ -455,7 +456,9 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
popupMenu.show(); popupMenu.show();
} }
return true; return true;
} else {
return false;
}
} }
}; };