Asus Zenfone (Android) TextView\\TextWatcher keyboard input bug

给你一囗甜甜゛ 提交于 2019-12-06 12:02:19

I found a solution for this problem, in my case was the inputType attribute on EditText was with the param: textCapCharacters, and i resolve using the textNoSuggestions. You can also use both with the pipe operator '|'.

 android:inputType="textCapCharacters|textNoSuggestions"

For future googlers!

the bug is from Asus ZenUI's keyboard, as mentioned in the question. And workaround suggested by @Gabriel Correra totally solves the issue, however you may not want to put this flag for all the users since not everyone is using this buggy keyboard.

with this snippet you can find out if user's default keyboard is Asus ZenUI's keyboard and if so add the mentioned flag programmatically and let the other users enjoy their suggestions!

String def = Settings.Secure.getString(getContext().getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
if(def.equals("com.asus.ime/.IME")) {
   setInputType(getInputType() | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!