Change default keyboard by tapping on icon

This commit is contained in:
PavelRatushny 2017-11-03 18:48:01 +02:00
parent 83215d47a3
commit 21494f20e1

View file

@ -196,9 +196,8 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
public void onClick(View view) {
View focusedView = getDialog().getCurrentFocus();
if (focusedView != null) {
if (isOsmandKeyboardCurrentlyVisible()) {
changeOsmandKeyboardVisibility(false);
}
useOsmandKeyboard = false;
changeKeyboard();
AndroidUtils.showSoftKeyboard(focusedView);
}
}
@ -570,17 +569,21 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
changeEditTextSelections();
}
private void changeKeyboard() {
if (orientationPortrait && !useOsmandKeyboard && isOsmandKeyboardCurrentlyVisible()) {
changeOsmandKeyboardVisibility(false);
}
changeKeyboardInBoxes();
changeKeyboardInEditTexts();
changeEditTextSelections();
}
private CoordinateInputBottomSheetDialogFragment.CoordinateInputFormatChangeListener createCoordinateInputFormatChangeListener() {
return new CoordinateInputBottomSheetDialogFragment.CoordinateInputFormatChangeListener() {
@Override
public void onKeyboardChanged(boolean useOsmandKeyboard) {
CoordinateInputDialogFragment.this.useOsmandKeyboard = useOsmandKeyboard;
if (orientationPortrait && !useOsmandKeyboard && isOsmandKeyboardCurrentlyVisible()) {
changeOsmandKeyboardVisibility(false);
}
changeKeyboardInBoxes();
changeKeyboardInEditTexts();
changeEditTextSelections();
changeKeyboard();
}
@Override