You cannot change "headers" color if you are using Nokia S40. The color will be follow the mobile phone color theme. The only way is using full screen, and draw ourself the Headers.
Nokia S40 custom header bar
Question
I'm building a custom header bar for Nokia S40, in LWUIT.
I've found 2 issues.
My Form
has a BorderLayout
and I've added the header bar (Container
) in the NORTH. This container doesn't fill the width of the Form
, as the CategoryBar
does. I try with BoxLayout
but I get the same result. I want that my custom header bar looks like the native CategoryBar
, full width and visible over the rest of the Components
.
Second issue.
I set my app to full screen using Display.getInstance().setForceFullScreen(true);
and I've lost all the back Commands
of my app. Any idea?
La solution
Autres conseils
In my application it's work:
protected void createTitle(Form f) {
Container titleContainer = f.getTitleArea();
titleContainer.removeAll();
titleContainer.setLayout(new BorderLayout());
titleContainer.addComponent(BorderLayout.CENTER, titleBarContainer);
titleContainer.addComponent(BorderLayout.EAST, labelLogo);
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow