Software Archive
Read-only legacy content

[Resolved] Status Bar Plug-in + Framework 7

Mitchell_Franklin
New Contributor I
532 Views

Hello again,

I went an updated the default plug-ins after the latest XDK update (By the way great enhancements) in which the updated the cordova-plugin-statusbar to version 2.1.0, when this builds out with Framework 7 the header now contains a gap in the App - image below.

The below was created using a new project not an existing one on the off chance that it was the issue. Note that in the Emulator the issue is not present only on the build.

image1.PNG

Once I changed my initial project back to version 1.0.0 the header returned to the top next to the status bar

image2.PNG

 

0 Kudos
1 Solution
Mitchell_Franklin
New Contributor I
532 Views

Hi again,

 

Been checking into this a bit further and have found a bug with the ios xml file.

The setting below always converts back to false when it is being loaded to the build engine even after it is changed to true, true is required to allow the header to appear properly in the new version of the plugin for IOS.

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

Reading the documentation for anyone who is having the same issue add the below lines to the index_user_scripts.js after  function register_event_handlers()

//Example

 function register_event_handlers()
 {
    
    StatusBar.overlaysWebView(true);
    StatusBar.styleDefault();

---normal code after this---

 

This will update the webview on startup and allow any of the frameworks status bar to reside correctly, you can off course change the background color and text to match your app - visit https://www.npmjs.com/package/cordova-plugin-statusbar to see the additional detail if required

 

View solution in original post

0 Kudos
8 Replies
Elroy_A_Intel
Employee
532 Views

The emulator is not expected to give you actual device 1:1 representation instead it is developed to help you visualize your application on a virtual device of your choosing. I recommend that you use 1.0.0 instead of 2.1 as 2.1 is trying to address iOS's new status bar rendering style of which the status bar hovers above the application instead of being on the top within a block.

0 Kudos
Amrita_C_Intel
Employee
532 Views

I would stay stick with 1.0 and try testing that after building.

0 Kudos
Mitchell_Franklin
New Contributor I
532 Views

Elroy and Amrita, thanks for the information - I will keep with version 1 for now, thanks for your help as always.

0 Kudos
Mitchell_Franklin
New Contributor I
533 Views

Hi again,

 

Been checking into this a bit further and have found a bug with the ios xml file.

The setting below always converts back to false when it is being loaded to the build engine even after it is changed to true, true is required to allow the header to appear properly in the new version of the plugin for IOS.

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

Reading the documentation for anyone who is having the same issue add the below lines to the index_user_scripts.js after  function register_event_handlers()

//Example

 function register_event_handlers()
 {
    
    StatusBar.overlaysWebView(true);
    StatusBar.styleDefault();

---normal code after this---

 

This will update the webview on startup and allow any of the frameworks status bar to reside correctly, you can off course change the background color and text to match your app - visit https://www.npmjs.com/package/cordova-plugin-statusbar to see the additional detail if required

 

0 Kudos
Anusha_M_Intel1
Employee
532 Views

Hi Mitchell,

That setting is false by default in any sample or template you create - in the intelxdk.config.additions.xml file. I will see if I can reproduce this problem. Did you only change the ios.xml file or also the master intelxdk.config.additions.xml file?

0 Kudos
Anusha_M_Intel1
Employee
532 Views

The final config.xml file in my ios build reflects 

<preference name="StatusBarOverlaysWebView" value="true"/>

after I changed it in both ios.xml and additions.xml.

Could you try this again?

0 Kudos
Mitchell_Franklin
New Contributor I
532 Views

Hi Anusha,

Yes if I update both ios and additions xml the setting does hold (i removed the Java part to make sure), so not sure what the best way forward is but believe if you update the IOS this should hold or the setting to be valid in one place only?

Thanks again for checking into this

Mitch

0 Kudos
PaulF_IntelCorp
Employee
532 Views

Mitchell -- you should only have to change this setting in the additions.xml file. The ios.xml file is auto-generated each time you perform a build or use the Test tab. The contents of the additions.xml file is added to the ios.xml file when it is auto-generated.

0 Kudos
Reply