[
https://issues.apache.org/jira/browse/CB-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14173004#comment-14173004
]
Jesse MacFadyen edited comment on CB-5440 at 10/15/14 9:42 PM:
---------------------------------------------------------------
You should not be modifying MainPage.xaml
Use the plugin if you want to show or hide the statusbar.
{code}
btnShow.addEventListener("click", function () { StatusBar.show();});
btnHide.addEventListener("click", function () { StatusBar.hide(); });
btnAlpha100.addEventListener("click", function () {
StatusBar.backgroundColorByHexString("#FF000000"); });
btnAlpha33.addEventListener("click", function () {
StatusBar.backgroundColorByHexString("#33000000");});
window.onresize = function () {
txtOut.innerHTML = "Height: " + window.innerHeight + " Width: " +
window.innerWidth;
};
// ===================================
<div class="app">
<button id="btnShow">Show</button>
<button id="btnHide">Hide</button>
<button id="btnAlpha100">Opaque</button>
<button id="btnAlpha33">Transparent</button>
<div id="txtOut"></div>
</div>
{code}
Showing or hiding the status bar will trigger a window.resize event.
Setting the status bar background to ANY transparent value will make it overlay
the webview, and full opacity will stop it from overlaying.
ie. if you want a non-transparent looking Blue status bar that overlays the
webview:
{code}
StatusBar.backgroundColorByHexString("#FE0000FF");
{code}
To install the statusbar plugin:
{code}
cordova plugin add org.apache.cordova.statusbar
{code}
was (Author: purplecabbage):
You should not be modifying MainPage.xaml
Use the plugin if you want to show or hide the statusbar.
{code}
btnShow.addEventListener("click", function () { StatusBar.show();});
btnHide.addEventListener("click", function () { StatusBar.hide(); });
btnAlpha100.addEventListener("click", function () {
StatusBar.backgroundColorByHexString("#FF000000"); });
btnAlpha33.addEventListener("click", function () {
StatusBar.backgroundColorByHexString("#33000000");});
window.onresize = function () {
txtOut.innerHTML = "Height: " + window.innerHeight + " Width: " +
window.innerWidth;
};
// ===================================
<div class="app">
<button id="btnShow">Show</button>
<button id="btnHide">Hide</button>
<button id="btnAlpha100">Opaque</button>
<button id="btnAlpha33">Transparent</button>
<div id="txtOut"></div>
</div>
{code}
Showing or hiding the status bar will trigger a window.resize event.
Setting the status bar background to ANY transparent value will make it overlay
the webview, and full opacity will stop it from overlaying.
ie. if you want a non-transparent looking Blue status bar that overlays the
webview:
{code}
StatusBar.backgroundColorByHexString("#FE0000FF");
{code}
> Activating SystemTray in WP8 app doesn't shrink the viewport in portrait
> ------------------------------------------------------------------------
>
> Key: CB-5440
> URL: https://issues.apache.org/jira/browse/CB-5440
> Project: Apache Cordova
> Issue Type: Bug
> Components: WP8
> Affects Versions: 3.1.0
> Environment: Windows Phone 8 (didn't test on 7), not specific to
> device
> Reporter: Kamen Bundev
> Assignee: Jesse MacFadyen
> Attachments: SystemTrayViewport.zip
>
>
> Adding shell:SystemTray.IsVisible="True" to MainPage.xaml doesn't shrink the
> Cordova WebView in portrait mode, but instead pushes it down with about 25px
> - as much as the SystemTray height. Landscape orientation is okay (the
> WebView is shorter than it should, but this looks like a different issue).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]