Search code examples
androidioscordovainappbrowser

Cordova InAppBrowser hidden until it finished to load


I'm using cordova to open a remote url inside my app. My problem is that I obtain a blank screen during the few secondsof content loading.

Is there a way to "hide" the browser view during the time it finishes to load the content ?

Thank you


Solution

  • There is hidden parameter:

    var options = "location=yes,hidden=yes";
    
    inAppBrowserRef = cordova.InAppBrowser.open(url, target, options);
    
    addEventListener('loadstop', loadStopCallBack);
    
    function loadStopCallBack() {
    
        inAppBrowserRef.show();
    }
    

    See the plugin docs for example details.