1
0
Fork 0

enabled language switching while typing in ABC mode too

This commit is contained in:
sspanak 2025-05-19 17:20:37 +03:00 committed by Dimo Karaivanov
parent 2ac71c3440
commit 88ea103079
2 changed files with 9 additions and 2 deletions

View file

@ -190,8 +190,8 @@ abstract public class CommandHandler extends TextEditingHandler {
final String digits = mInputMode.getSequence();
final int textCase = mInputMode.getTextCase();
mInputMode = InputMode.getInstance(settings, mLanguage, inputType, textField, determineInputModeId());
if (!InputModeKind.isNumeric(mInputMode)) {
mInputMode.setTextCase(textCase);
if (InputModeKind.isPredictive(mInputMode)) {
mInputMode.setSequence(digits);
}

View file

@ -98,6 +98,13 @@ class ModeABC extends InputMode {
return true;
}
@Override
public void setSequence(@NonNull String sequence) {
super.setSequence(sequence);
refreshSuggestions();
shouldSelectNextLetter = true;
}
@Override public void onAcceptSuggestion(@NonNull String w) { reset(); }
@Override public boolean shouldAcceptPreviousSuggestion(String w) { return !shouldSelectNextLetter; }
@Override public boolean shouldSelectNextSuggestion() { return shouldSelectNextLetter; }