动态更改android软键盘语言设置?
我的应用程序中有一些编辑框,其中一些我将输入英语文本,其中一些我将输入西班牙语。
我使用的是标准的 Android 软键盘,但是由于我的设备区域设置设置为英语,当我在“西班牙语”编辑框之一中键入西班牙语时,英语纠正文本/预测文本使此操作变得困难。
我发现的唯一解决方法是进入设备设置并更改语言,但这很烦人。
无论如何,我是否可以有某种按钮,单击该按钮时会动态更改软键盘语言设置?这是通过任何意图暴露的吗?
问候
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试在键盘上的空格键上滑动手指来更改语言。
Try to slide your finger across the spacebar on your keyboard to change languages.
不,抱歉。
但是,您可以将
textNoSuggestions
与 一起使用EditText
上的android:inputType
属性尝试删除建议。No, sorry.
However, you can use
textNoSuggestions
with yourandroid:inputType
attribute on theEditText
to try to get rid of the suggestions.在手机主设置中您可以选择输入语言,然后可以滑动空格键进行切换。
In the main phone settings you can choose input languages and then you can swipe the space bar to switch.