Dynamically change android soft keyboard language setting?

这一生的挚爱 提交于 2020-01-03 04:16:05

问题


I have some edit boxes in my app, some of them I will input English text, some of them I will input Spanish.

I'm using the standard android soft keyboard, however as my device locale is set to English, when I type Spanish in one of my "Spanish" edit boxes, the English corrective text/predictive text makes this difficult.

The only workaround I've found, is to go into the device settings and change the language over, but this is quite annoying.

Is there anyway I could have some kind of button, that when clicked would dynamically change the soft keyboards language setting? Is this exposed via any Intents?

Regards


回答1:


Try to slide your finger across the spacebar on your keyboard to change languages.




回答2:


Is there anyway I could have some kind of button, that when clicked would dynamically change the soft keyboards language setting? Is this exposed via any Intents?

No, sorry.

However, you can use textNoSuggestions with your android:inputType attribute on the EditText to try to get rid of the suggestions.




回答3:


In the main phone settings you can choose input languages and then you can swipe the space bar to switch.



来源:https://stackoverflow.com/questions/6545734/dynamically-change-android-soft-keyboard-language-setting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!