Change Keyboard input language

前端 未结 2 1702
无人及你
无人及你 2020-11-27 21:04

I am developing one android app in two different languages. When user click on \"Change language\" button it ask to choose language from two different languages option and c

2条回答
  •  清歌不尽
    2020-11-27 21:42

    (API 24+): If you are using a TextView/EditText, then you can call TextView#setImeHintLocales(LocaleList)

    textView.setImeHintLocales(new LocaleList(new Locale("zh", "CN")));
    

    Note: If you want new "hint" to take effect immediately you need to call InputMethodManager#restartInput(View).

提交回复
热议问题