在 android 中横向显示软键盘
showing softkeyboard in android on landscape orientation
EditText textView = (EditText ) findViewById(R.id.editText1);
textView.requestFocus();
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(textView, InputMethodManager.SHOW_IMPLICIT);
我用这段代码自动打开软键盘。
它在正常情况下工作正常,但当我将其更改为横向时 android:screenOrientation="landscape"
在清单中,它停止工作。
怎么了?
需要强势表现出来
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,InputMethodManager.HIDE_IMPLICIT_ONLY);
imm.showSoftInput(textView, InputMethodManager.SHOW_FORCED);
EditText textView = (EditText ) findViewById(R.id.editText1);
textView.requestFocus();
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(textView, InputMethodManager.SHOW_IMPLICIT);
我用这段代码自动打开软键盘。
它在正常情况下工作正常,但当我将其更改为横向时 android:screenOrientation="landscape"
在清单中,它停止工作。
怎么了?
需要强势表现出来
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,InputMethodManager.HIDE_IMPLICIT_ONLY);
imm.showSoftInput(textView, InputMethodManager.SHOW_FORCED);