简体   繁体   English

动态改变android软键盘语言设置?

[英]Dynamically change android soft keyboard language setting?

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.我使用的是标准的 android 软键盘,但是由于我的设备区域设置为英语,当我在“西班牙语”编辑框中输入西班牙语时,英语纠正文本/预测文本使这变得困难。

The only workaround I've found, is to go into the device settings and change the language over, but this is quite annoying.我发现的唯一解决方法是将 go 放入设备设置并更改语言,但这很烦人。

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问候

Try to slide your finger across the spacebar on your keyboard to change languages.尝试在键盘上的空格键上滑动手指以更改语言。

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.但是,您可以将textNoSuggestionsEditText上的android:inputType属性一起使用,以尝试摆脱建议。

In the main phone settings you can choose input languages and then you can swipe the space bar to switch.在主手机设置中,您可以选择输入语言,然后您可以滑动空格键进行切换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM