So I have an Ionic/Phonegap app that I just built using ionic start myApp tabs
then I added an input on one of the views. When I focus the input using an android emulator or device, the keyboard come up but so do the tabs. Do I have to explicitly hide the tabs whenever the keyboard is active on android? I would think this would be a common issue but I haven't seen any complaints. Do I just have a bad project or something?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can change the activity properties in the manifest.xml
<activity android:windowSoftInputMode="adjustPan"> </activity>
Look at the example: http://rickluna.com/wp/2014/03/phonegap-3-adjustpan-with-fullscreen-theme/
回答2:
Add following css classes in your Style.ccs
/* Hide bottom tab bar when keyboard appears*/
.keyboard-open .has-tabs {
bottom: 0;
}
body.keyboard-open .has-footer {
bottom: 0;
}
above css classes will do the trick of hiding bottom tab bar when keyboard appears.