Babur
Babur

Reputation: 115

How to modify the height of the statusbar in codenameone?

How do I modify the height, background, margin and padding of the statusbar in Codename one?

It looks very bad.

enter image description here

Upvotes: 1

Views: 73

Answers (2)

Hristo Vrigazov
Hristo Vrigazov

Reputation: 1407

As Diamond said, you should modify UIIDs StatusBar and StatusBarSideMenu. The way to do that is the following:

  1. Open theme.res file
  2. Find the theme under Themes
  3. Open the UIID you want to change, if it is not present, click Add.
  4. Type the name of the UIID
  5. Change the style however you wish

Then call .setUIID() method on the component on which you want to do that. Note that components by default get UIID, for example Label has UIID "Label" and so on, so you won't need to call setUIID.

Upvotes: 2

Diamond
Diamond

Reputation: 7483

Don't base the look of the statusbar on simulator output, this will be different from the looks on real devices.

If you want to style the statusbar, modify UIIDs StatusBar and StatusBarSideMenu to your desire.

Upvotes: 2

Related Questions