オンスクリーン キーボードを強制的に iOS/Android に表示する HTML5/javaScript で呼び出すことができるメソッドはありますか?
私は HTML5 キーボードを探しているのではなく、内部のオンスクリーン キーボードを表示する必要があることをデバイスに通知するだけです。
ありがとう
Androidの場合、これを使用できます:
public void showSoftKeyboard(View v) {
Activity activity = (Activity) v.getContext();
InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
inputMethodManager.showSoftInput(activity.getCurrentFocus().getWindowToken(), 0);
}
または、次のように呼び出します。
((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
iOSの場合、これを見つけました:
$('#element').focus().blur().focus();