Open ggendre opened 8 years ago
On iOS, default values:
TO BE DISCUSSED : The current statusbar is over the webview on iOS. should we be able to reproduce this as well ?
proposed API in the issue does not allow this for the moment.
We can't propose this feature while having the WebView background visible under the status bar
androidBackgroundColor is accessible only for android 5.0 Under you must change the AppTheme, https://developer.android.com/training/material/theme.html#ColorPalette
@Doc1faux : what we could do is :
@Myrdhinn : rename key androidBackgroundColor
to backgroundColor
because we will be able to use it on iOS aswell.
@ggendre Mmhhhh NO! The "WebView background color" will be defined by the backgroundColor
attribute of the controller defined in the cobalt.conf
configuration file as explained in issue #106.
You should not have a status bar color different from the navigation bar one or the view one on iOS!
So, if the navigation bar is not present, the "WebView background" (in fact, the root view one), it should be, in this order:
backgroundColor
of the controller defined in the cobalt.conf
file if present (issue #106),If navigation bar is present, the status bar color will be the navigation bar background one.
You are going to hate me but we need to make it possible to configure this from the JS side and in navigation calls. Added tasks for this. it could be done in a second time if needed.
Enable cobalt app developper to custom the status bar visibility and colors.
Guidelines :
On Android the background color should be dark. and darken than bars. because text color is always white.
On iOS the text color can be white or black. The background color is transparent if no bars are set and corresponds to the bars background color if bars are set.
What we could do :
Add a
statusBar
object in eachcobalt.conf
controller configuration.Default would be :
visible:true
, black ios text color and black android backgroud color.The default android background color could be calculated to be darker than the specified bars color.
can be set from javascript too
As for native bars, this feature should be available from the JS side too with a function like this :
This is sending this message to the native side
{type: "ui", control: "statusBar", data: {action: "set", bar: { visible: true, lightText : false}}
}can be set from navigation calls too
As for native bars, this feature should be available on
push
,replace
,modal
navigation callsProgress
backgroundcolor