android.view.inputmethod.InputMethodManager#showInputMethodPicker ( )源码实例Demo

下面列出了android.view.inputmethod.InputMethodManager#showInputMethodPicker ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: remotekeyboard   文件: MainActivity.java
@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;
}
 
源代码2 项目: remotekeyboard   文件: WidgetActivity.java
@Override
protected void onResume() {
	super.onResume();
	final InputMethodManager service = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
	service.showInputMethodPicker();
	finish();
}
 
public void onChooseKeyboardsButtonClick(View view) {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
源代码4 项目: mongol-library   文件: MongolEditTextActivity.java
public void keyboardClick(View view) {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
@Override
public void onSystemKeyboardRequest() {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
源代码6 项目: Chimee   文件: ChimeeInputMethodService.java
@Override
public void onSystemKeyboardRequest() {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
源代码7 项目: Chimee   文件: MainActivity.java
private void showSystemKeyboardChooser() {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
    mImePickerState = ImePickerAction.CHOOSING;
}
 
源代码8 项目: Chimee   文件: SettingsActivity.java
private void showChooseKeyboardDialog() {
    InputMethodManager im = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
    if (im == null) return;
    im.showInputMethodPicker();
}
 
源代码9 项目: SecondScreen   文件: KeyboardChangeReceiver.java
@Override
public void onReceive(Context context, Intent intent) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.showInputMethodPicker();
}
 
源代码10 项目: remotekeyboard   文件: RemoteKeyboardService.java
@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) {

			}
		}
	}
}