Merge pull request #3258 from markcapella/recipientSelectViewIssue

Recipient select view issue
This commit is contained in:
cketti 2018-03-22 05:39:40 +01:00 committed by GitHub
commit 02d2e16fe3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,6 +207,20 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem
}
}
/**
* TokenCompleteTextView removes composing strings, and etc, but leaves internal composition
* predictions partially constructed. Changing either/or the Selection or Candidate start/end
* positions, forces the IMM to reset cleaner.
*/
@Override
protected void replaceText(CharSequence text) {
super.replaceText(text);
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.updateSelection(this, getSelectionStart(), getSelectionEnd(), -1, -1);
}
private void displayKeyboard() {
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null) {