辰野客资源整合网

您现在的位置是:首页 > 资讯中心 > 生活百科

生活百科

拉丁名

2023-08-13 15:24:25生活百科19
大家好,小耶来为大家解答以上的问题。拉丁名这个很多人还不知道,现在让我们一起来看看吧!1、【GB】提供简单的sample code。2、如默认将俄...

大家好,小耶来为大家解答以上的问题。拉丁名这个很多人还不知道,现在让我们一起来看看吧!

1、【GB】提供简单的sample code。

2、如默认将俄语、英文、法语输入法勾选:1.新增文件LatinImeReceiver.JAVApackage com.android.inputmethod.latin;import android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;import android.content.SharedPreferences;import android.content.SharedPreferences.Editor;import android.preference.PreferenceManager;import android.provider.Settings;import android.util.Log;import android.view.inputmethod.InputMethodInfo;import android.view.inputmethod.InputMethodManager;//import android.view.inputmethod.InputMethodSubtype;import android.text.TextUtils;public class LatinImeReceiver extends BroadcastReceiver {private static final String TAG = LatinImeReceiver.class.getSimpleName();@Overridepublic void onReceive(Context context, Intent intent) {Log.d("LatinImeReceiver", "step1");SharedPreferences sp = context.getSharedPreferences("com.android.inputmethod.latin_preferences",Context.MODE_PRIVATE);boolean hasSet = sp.getBoolean("has_set", false);if (!hasSet) {Log.d("LatinImeReceiver", "step2");Editor editor = sp.edit();Log.d("LatinImeReceiver", "step3");editor.putString(LatinIME.PREF_SELECTED_LANGUAGES, "en_US,ru,fr"); //默认将英语、俄语勾选。

3、具体该怎么写可以参考inputlanguageselection.java中的WHITELIST_LANGUAGESeditor.putBoolean("has_set", true);Log.d("LatinImeReceiver", "step4");。

本文到此分享完毕,希望对大家有所帮助。


TAG:
热门标签: 晋文公(3) 影帝(1) 进口袋(1) 播种(1) 石昊(1)

部分信息与图片素材来源于互联网,如内容侵权与违规,请与本站联系,将立即处理,举报邮箱:1356571586@qq.com


随机关键词:

资源联系人