質問

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 Commandsof my app. Any idea?

役に立ちましたか?

解決

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.

他のヒント

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);
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top