Reputation: 245
I can set Android's ActionBar background color easily via this code on colors.xml
<resources>
<color name="colorPrimary">#ffffc003</color>
<color name="colorPrimaryDark">#ffffffff</color>
<color name="colorAccent">#ff009486</color>
</resources>
I figured I could set the text to black adding this part:
<color name="textColorPrimary">#ff000000</color>
But it has no effect, so the background is white and the text is also white.
BTW it would be nice to allow programatically change these values, so different forms could style their own action bars.
[EDIT] The first image has android.statusbar_hidden=true. The second, use colors.txt with colorPrimaryDark as white. And the third is the result I would like to have: a status bar with white background and black foreground.
Upvotes: 2
Views: 95
Reputation: 52770
This will only impact the color of the status bar on top but it won't have any impact if you set the status bar to transparent.
It won't impact the action bar itself which is now drawn 100% by Codename One. I would suggest setting the status bar to transparent which will be more consistent with the way iOS handles this: how can color of status bar be changed as per different forms in codenameone?
Upvotes: 0