Java Code Examples for android.view.inputmethod.InputMethodManager#showInputMethodPicker()

The following examples show how to use android.view.inputmethod.InputMethodManager#showInputMethodPicker() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java    From remotekeyboard with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
	switch (item.getItemId()) {
		case R.id.item_help: {
			Intent browserIntent = new Intent(Intent.ACTION_VIEW,
					Uri.parse(getString(R.string.homepage)));
			startActivity(browserIntent);
			break;
		}
		case R.id.item_replacements: {
			startActivity(new Intent(this, ReplacementsListActivity.class));
			break;
		}
		case R.id.item_settings: {
			startActivity(new Intent(this, SettingsActivity.class));
			break;
		}
		case R.id.item_select: {
			InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
			imm.showInputMethodPicker();
			break;
		}
		case R.id.item_tf: {
			String url = "market://details?id=de.onyxbits.textfiction";
			Intent i = new Intent(Intent.ACTION_VIEW);
			i.setData(Uri.parse(url));
			startActivity(i);
			break;
		}
	}
	return false;
}
 
Example 2
Source File: WidgetActivity.java    From remotekeyboard with Apache License 2.0 5 votes vote down vote up
@Override
protected void onResume() {
	super.onResume();
	final InputMethodManager service = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
	service.showInputMethodPicker();
	finish();
}
 
Example 3
Source File: CustomSystemKeyboardActivity.java    From mongol-library with MIT License 4 votes vote down vote up
public void onChooseKeyboardsButtonClick(View view) {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
Example 4
Source File: MongolEditTextActivity.java    From mongol-library with MIT License 4 votes vote down vote up
public void keyboardClick(View view) {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
Example 5
Source File: ImeContainerInputMethodService.java    From mongol-library with MIT License 4 votes vote down vote up
@Override
public void onSystemKeyboardRequest() {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
Example 6
Source File: ChimeeInputMethodService.java    From Chimee with MIT License 4 votes vote down vote up
@Override
public void onSystemKeyboardRequest() {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
Example 7
Source File: MainActivity.java    From Chimee with MIT License 4 votes vote down vote up
private void showSystemKeyboardChooser() {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
    mImePickerState = ImePickerAction.CHOOSING;
}
 
Example 8
Source File: SettingsActivity.java    From Chimee with MIT License 4 votes vote down vote up
private void showChooseKeyboardDialog() {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
Example 9
Source File: KeyboardChangeReceiver.java    From SecondScreen with Apache License 2.0 4 votes vote down vote up
@Override
public void onReceive(Context context, Intent intent) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.showInputMethodPicker();
}
 
Example 10
Source File: RemoteKeyboardService.java    From remotekeyboard with Apache License 2.0 4 votes vote down vote up
@Override
public void onPress(int primaryCode) {
	// SEE: res/xml/keyboarddef.xml for the definitions.
	switch (primaryCode) {
		case 0: {
			InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
			imm.showInputMethodPicker();
			break;
		}
		case 1: {
			/*
			 * Intent intent = new Intent(this, SettingsActivity.class);
			 * intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
			 * startActivity(intent);
			 */
			break;
		}
		case 2: {
			try {
				InputConnection con = getCurrentInputConnection();
				CharSequence txt = con.getSelectedText(0);
				if (txt == null) {
					txt = getCurrentInputConnection().getExtractedText(
							new ExtractedTextRequest(), 0).text;
				}
				TelnetEditorShell.self.showText(txt + "");
				Toast.makeText(this, R.string.msg_sent, Toast.LENGTH_SHORT).show();
			}
			catch (Exception exp) {
				Toast.makeText(this, R.string.err_noclient, Toast.LENGTH_SHORT)
						.show();
			}
			break;
		}
		case 3: {
			try {
				if (TelnetEditorShell.self != null) {
					TelnetEditorShell.self.disconnect();
					Toast.makeText(this, R.string.msg_client_disconnected,
							Toast.LENGTH_SHORT).show();
				}
				else {
					Toast.makeText(this, R.string.err_noclient, Toast.LENGTH_SHORT)
							.show();
				}
			}
			catch (Exception e) {

			}
		}
	}
}