App full screen and height of the body at the app launch

Hello,

I have a problem in my app, I want to make it fullscreen, but unfortunately on my first screen I also have a full screen background image (with background-size:cover properties).

On my app.js, I specify the fullscreen like that:

$ionicPlatform.ready(function() {
        // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
        // for form inputs)
        if(window.cordova && window.cordova.plugins.Keyboard) {
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
        }
        if(window.StatusBar) {
            ionic.Platform.fullScreen(true, false);
        }
    });

The problem is at the first launch, the app changed from normal to fullscreen, but the background image stay at its previous height (which make a not good looking white empty space at the bottom of the app ). If I go to an another screen and go back to this screen, the background image cover now the whole screen (I removed the cache, maybe it’s due to that, I didn’t try with it).

I imagine I can use a white and fake loading screen to wait the fullscreen mode before go to my title screen, but this is not convenient. I can also resize the background image after some second, in order to wait the fullscreen mode being activated, but it’s also not a good solution.

Thanks for your help.

1 Like