Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/210.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当接收Android蓝牙键盘输入时,我可以强制软键盘启动吗?_Android_Bluetooth_Keyboard - Fatal编程技术网

当接收Android蓝牙键盘输入时,我可以强制软键盘启动吗?

当接收Android蓝牙键盘输入时,我可以强制软键盘启动吗?,android,bluetooth,keyboard,Android,Bluetooth,Keyboard,我正在为Android Google TV创建一个自定义键盘,在设备屏幕上显示蓝牙键盘输入 但是,在蓝牙键盘上键入时,软键盘不会出现 InputMethodManager mgr = (InputMethodManager) getSystemService(context.INPUT_METHOD_SERVICE); 当我在蓝牙键盘上打字时,我希望软键盘出现在屏幕上 InputMethodManager mgr = (InputMethodManager) getSystemService(

我正在为Android Google TV创建一个自定义键盘,在设备屏幕上显示蓝牙键盘输入

但是,在蓝牙键盘上键入时,软键盘不会出现

InputMethodManager mgr = (InputMethodManager) getSystemService(context.INPUT_METHOD_SERVICE);
当我在蓝牙键盘上打字时,我希望软键盘出现在屏幕上

InputMethodManager mgr = (InputMethodManager) getSystemService(context.INPUT_METHOD_SERVICE);
在上面的代码中,是否可以在每次使用蓝牙键盘时强制显示软键盘? 它应该应用于使用键盘的任何地方,而不仅仅是视图

InputMethodManager inputMethodManager =
    (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInputFromWindow(
    linearLayout.getApplicationWindowToken(),
    InputMethodManager.SHOW_FORCED, 0);