简体   繁体   English

将ipad连接到蓝牙键盘时,ios的隐藏栏(在底部)

[英]Hide bar (at the bottom) of ios when connect ipad to bluetooth keyboard

Hi I'm developing phonegap/cordova project for ios device -- ipad. 嗨,我正在为ios设备(ipad)开发phonegap / cordova项目。 The app receive input text via bluetooth keyboard (because I don't want to show the keyboard on the screen). 该应用程序通过蓝牙键盘接收输入文本(因为我不想在屏幕上显示键盘)。 So far app can receive input as expected But about the apperance How can I remove or hide the bar at the bottom of the screen? 到目前为止,应用程序可以按预期接收输入。但是关于外观,如何删除或隐藏屏幕底部的栏? (please see images in the link below) (请在下面的链接中查看图片)

https://www.dropbox.com/sh/rt5w3ccqomec335/AADKUvt0w6KigfADAsx-ciu_a?dl=0 https://www.dropbox.com/sh/rt5w3ccqomec335/AADKUvt0w6KigfADAsx-ciu_a?dl=0

Here are my code 这是我的代码

Config.xml: config.xml文件:

<preference name="KeyboardDisplayRequiresUserAction" value="false" />

HTML: HTML:

<div style="overflow: hidden; position: relative; width: 1px; height: 1px; left: -500px">
     <input id="input" type="textfield" autocorrect="off" autocapitalize="off">
</div>

JS: JS:

document.getElementById('input').focus();

Thank you so much for your help! 非常感谢你的帮助!

Install this plugin to your project : https://github.com/driftyco/ionic-plugin-keyboard 将此插件安装到您的项目中: https : //github.com/driftyco/ionic-plugin-keyboard

And use this in JS : cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); 并在JS中使用它: cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); Documentation detail: https://github.com/driftyco/ionic-plugin-keyboard#keyboardhidekeyboardaccessorybar 文档详细信息: https : //github.com/driftyco/ionic-plugin-keyboard#keyboardhidekeyboardaccessorybar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM