love.textinput does not work correctly with keyboard suggestions on

Create issue
Issue #138 resolved
bio1712 created an issue

Device: Asus Zenpad C 7.0 Android version: 5.0

Using the ASUS keyboard with suggestions love.textinput does not work correctly. love.textinput is not called until you click on a suggestion. When you click on a suggestion or when you click on a symbol (like ' or [), love.textinput records all the string. This issue is addressed by disabling keyboard suggestions from the device settings. However this problem only happens with the letters, there is no problem with numbers or symbols.

Comments (1)

  1. bio1712 reporter

    Can be solved easily adding a line in SDLActivity.java:

    @Override
        public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
            ic = new SDLInputConnection(this, true);
    
            outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
                    | 33554432 /* API 11: EditorInfo.IME_FLAG_NO_FULLSCREEN */;
    
            outAttrs.inputType = EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS;  //ADD THIS LINE 
    
            return ic;
        }
    
  2. Log in to comment