List of usage examples for android.view.inputmethod InputMethodManager showInputMethodPicker
public void showInputMethodPicker()
From source file:org.distantshoresmedia.activities.Main.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);//from www . ja va 2s . c o m Main.context = getApplicationContext(); KeyboardDatabaseHandler.initializeDatabaseIfNecessary(this.getApplicationContext()); String html = getResources().getString(R.string.main_body); //html += "<p><i>Version: " + context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName + "</i></p>"; Spanned content = Html.fromHtml(html); TextView description = (TextView) findViewById(R.id.main_description); description.setMovementMethod(LinkMovementMethod.getInstance()); description.setText(content, BufferType.SPANNABLE); final Button setup1 = (Button) findViewById(R.id.main_setup_btn_configure_imes); setup1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { startActivityForResult(new Intent(android.provider.Settings.ACTION_INPUT_METHOD_SETTINGS), 0); } }); final Button setup2 = (Button) findViewById(R.id.main_setup_btn_set_ime); setup2.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.showInputMethodPicker(); } }); final Activity that = this; final Button setup4 = (Button) findViewById(R.id.main_setup_btn_input_lang); setup4.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { startActivityForResult(new Intent(that, InputLanguageSelection.class), 0); } }); final Button setup5 = (Button) findViewById(R.id.main_setup_btn_update_keyboards); setup5.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { updateKeyboards(); } }); final Button setup6 = (Button) findViewById(R.id.main_setup_btn_keyboard_sharing); setup6.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { sharePressed(); } }); final Button setup7 = (Button) findViewById(R.id.main_setup_btn_bug_reporting); setup7.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { reportBugPressed(); } }); }
From source file:net.HeZi.Android.HeInputLibrary.HeInput_Activation_Fragment.java
private void showInputMethodPicker() { InputMethodManager imeManager = (InputMethodManager) getActivity().getApplicationContext() .getSystemService(Context.INPUT_METHOD_SERVICE); if (imeManager != null) { imeManager.showInputMethodPicker(); }/*from w w w .j a v a 2s . c om*/ }
From source file:paulscode.android.mupen64plusae.game.GameActivity.java
@Override public void onGameSidebarAction(MenuItem menuItem) { switch (menuItem.getItemId()) { case R.id.menuItem_exit: mWaitingOnConfirmation = true;//ww w. j ava 2s . com CoreInterface.exit(); break; case R.id.menuItem_toggle_speed: CoreInterface.toggleSpeed(); //Reload the menu with the new speed final MenuItem toggleSpeedItem = mGameSidebar.getMenu().findItem(R.id.menuItem_toggle_speed); toggleSpeedItem.setTitle(this.getString(R.string.menuItem_toggleSpeed, NativeExports.emuGetSpeed())); mGameSidebar.reload(); break; case R.id.menuItem_set_speed: CoreInterface.setCustomSpeedFromPrompt(this); break; case R.id.menuItem_screenshot: CoreInterface.screenshot(); break; case R.id.menuItem_set_slot: CoreInterface.setSlotFromPrompt(this); break; case R.id.menuItem_slot_load: CoreInterface.loadSlot(this); break; case R.id.menuItem_slot_save: CoreInterface.saveSlot(this); if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) { mDrawerLayout.closeDrawer(GravityCompat.START); } break; case R.id.menuItem_file_load: CoreInterface.loadFileFromPrompt(this); break; case R.id.menuItem_file_save: CoreInterface.saveFileFromPrompt(); break; case R.id.menuItem_file_load_auto_save: CoreInterface.loadAutoSaveFromPrompt(this); break; case R.id.menuItem_disable_frame_limiter: CoreInterface.toggleFramelimiter(); final int resId = NativeExports.emuGetFramelimiter() ? R.string.menuItem_enableFramelimiter : R.string.menuItem_disableFramelimiter; //Reload the menu with the new speed final MenuItem frameLimiterItem = mGameSidebar.getMenu().findItem(R.id.menuItem_disable_frame_limiter); frameLimiterItem.setTitle(this.getString(resId)); mGameSidebar.reload(); break; case R.id.menuItem_player_one: setPakTypeFromPrompt(1); break; case R.id.menuItem_player_two: setPakTypeFromPrompt(2); break; case R.id.menuItem_player_three: setPakTypeFromPrompt(3); break; case R.id.menuItem_player_four: setPakTypeFromPrompt(4); break; case R.id.menuItem_setIme: final InputMethodManager imeManager = (InputMethodManager) this .getSystemService(Context.INPUT_METHOD_SERVICE); if (imeManager != null) imeManager.showInputMethodPicker(); break; case R.id.menuItem_reset: mWaitingOnConfirmation = true; CoreInterface.restart(); break; default: } }
From source file:org.mozilla.gecko.GeckoAppShell.java
public static void showInputMethodPicker() { InputMethodManager imm = (InputMethodManager) GeckoApp.mAppContext .getSystemService(Context.INPUT_METHOD_SERVICE); imm.showInputMethodPicker(); }
From source file:paulscode.android.mupen64plusae.game.GameFragment.java
@Override public void onGameSidebarAction(MenuItem menuItem) { switch (menuItem.getItemId()) { case R.id.menuItem_exit: mWaitingOnConfirmation = true;//from ww w . j a v a 2s .co m mCoreFragment.exit(); break; case R.id.menuItem_toggle_speed: mCoreFragment.toggleSpeed(); //Reload the menu with the new speed final MenuItem toggleSpeedItem = mGameSidebar.getMenu().findItem(R.id.menuItem_toggle_speed); toggleSpeedItem .setTitle(this.getString(R.string.menuItem_toggleSpeed, mCoreFragment.getCurrentSpeed())); mGameSidebar.reload(); break; case R.id.menuItem_set_speed: mCoreFragment.setCustomSpeedFromPrompt(); break; case R.id.menuItem_screenshot: mCoreFragment.screenshot(); break; case R.id.menuItem_set_slot: mCoreFragment.setSlotFromPrompt(); break; case R.id.menuItem_slot_load: mCoreFragment.loadSlot(); break; case R.id.menuItem_slot_save: mCoreFragment.saveSlot(); if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) { mDrawerLayout.closeDrawer(GravityCompat.START); } break; case R.id.menuItem_file_load: mCoreFragment.loadFileFromPrompt(); break; case R.id.menuItem_file_save: mCoreFragment.saveFileFromPrompt(); break; case R.id.menuItem_file_load_auto_save: mCoreFragment.loadAutoSaveFromPrompt(); break; case R.id.menuItem_disable_frame_limiter: mCoreFragment.toggleFramelimiter(); final int resId = mCoreFragment.getFramelimiter() ? R.string.menuItem_enableFramelimiter : R.string.menuItem_disableFramelimiter; //Reload the menu with the new speed final MenuItem frameLimiterItem = mGameSidebar.getMenu().findItem(R.id.menuItem_disable_frame_limiter); frameLimiterItem.setTitle(this.getString(resId)); mGameSidebar.reload(); break; case R.id.menuItem_player_one: setPakTypeFromPrompt(1); break; case R.id.menuItem_player_two: setPakTypeFromPrompt(2); break; case R.id.menuItem_player_three: setPakTypeFromPrompt(3); break; case R.id.menuItem_player_four: setPakTypeFromPrompt(4); break; case R.id.menuItem_setIme: final InputMethodManager imeManager = (InputMethodManager) getActivity() .getSystemService(Context.INPUT_METHOD_SERVICE); if (imeManager != null) imeManager.showInputMethodPicker(); break; case R.id.menuItem_reset: mWaitingOnConfirmation = true; mCoreFragment.restart(); break; default: } }
From source file:jackpal.androidterm.Term.java
private boolean doSendActionBarKey(EmulatorView view, int key) { if (key == 999) { // do nothing } else if (key == 1002) { doToggleSoftKeyboard();//from ww w.j a v a 2 s . c om } else if (key == 1249) { doPaste(); } else if (key == 1250) { doCreateNewWindow(); } else if (key == 1251) { if (mVimApp && mSettings.getInitialCommand().matches("(.|\n)*(^|\n)-vim\\.app(.|\n)*") && mTermSessions.size() == 1) { sendKeyStrings(":confirm qa\r", true); } else { confirmCloseWindow(); } } else if (key == 1252) { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.showInputMethodPicker(); } else if (key == 1253) { sendKeyStrings(":confirm qa\r", true); } else if (key == 1254) { view.sendFnKeyCode(); } else if (key == KeycodeConstants.KEYCODE_ALT_LEFT) { view.sendAltKeyCode(); } else if (key == KeycodeConstants.KEYCODE_CTRL_LEFT) { view.sendControlKeyCode(); } else if (key == 1247) { sendKeyStrings(":", false); } else if (key == 1255) { setFunctionBar(2); } else if (key == 1260) { view.doImeShortcutsAction(); } else if (key >= 1351 && key <= 1353) { view.doImeShortcutsAction(key - 1300); } else if (key > 0) { KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, key); dispatchKeyEvent(event); event = new KeyEvent(KeyEvent.ACTION_UP, key); dispatchKeyEvent(event); } return true; }