Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Mitchell_Franklin
New Contributor I
105 Views

[Resolved] Status Bar Plug-in + Framework 7

Jump to solution

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

 

Tags (2)
0 Kudos
1 Solution
Mitchell_Franklin
New Contributor I
105 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

8 Replies
Elroy_A_Intel
Employee
105 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.

Amrita_C_Intel
Employee
105 Views

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

Mitchell_Franklin
New Contributor I
105 Views

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

Mitchell_Franklin
New Contributor I
106 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

Anusha_M_Intel1
Employee
105 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?

Anusha_M_Intel1
Employee
105 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?

Mitchell_Franklin
New Contributor I
105 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

PaulF_IntelCorp
Employee
105 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.

Reply