TerminalView: fix for samsung keyboards

Now keyboard will be shown with correct input method.
This commit is contained in:
Leonid Plyushch 2019-02-25 14:06:44 +02:00
parent ef34333d4f
commit f5b976f597

View file

@ -235,14 +235,12 @@ public final class TerminalView extends View {
@Override @Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) { public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
// Using InputType.NULL is the most correct input type and avoids issues with other hacks.
//
// Previous keyboard issues: // Previous keyboard issues:
// https://github.com/termux/termux-packages/issues/25 // https://github.com/termux/termux-packages/issues/25
// https://github.com/termux/termux-app/issues/87. // https://github.com/termux/termux-app/issues/87.
// https://github.com/termux/termux-app/issues/126. // https://github.com/termux/termux-app/issues/126.
// https://github.com/termux/termux-app/issues/137 (japanese chars and TYPE_NULL). // https://github.com/termux/termux-app/issues/137 (japanese chars and TYPE_NULL).
outAttrs.inputType = InputType.TYPE_NULL; outAttrs.inputType = InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;;
// Note that IME_ACTION_NONE cannot be used as that makes it impossible to input newlines using the on-screen // Note that IME_ACTION_NONE cannot be used as that makes it impossible to input newlines using the on-screen
// keyboard on Android TV (see https://github.com/termux/termux-app/issues/221). // keyboard on Android TV (see https://github.com/termux/termux-app/issues/221).