简体   繁体   中英

Status bar shows on android when keyboard is visible

have full screen app developed for both ios and android using ionic. I have <preference name="Fullscreen" value="true" /> on config.xml and

if (window.StatusBar) { // org.apache.cordova.statusbar required StatusBar.hide(); ionic.Platform.fullScreen(); } // StatusBar.styleDefault(); ionic.Platform.isFullScreen = true; on app.js. On the android device when i click on input text field to type something statusbar shows automatically. We i close the keyboard status bar still remains visible until i close it manually. How can i fix this. Please suggest me. Thanks

Here is the work around solution which i figured out myself.

if (ionic.Platform.isAndroid()) { window.addEventListener("native.hidekeyboard", function () { StatusBar.hide(); window.AndroidFullScreen.immersiveMode(false, false); });}

Put this code on app.js in $ionicPlatform.ready . Feel free to reply on this post if you are still having same issue. Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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