Reham
Reham

Reputation: 1986

Show only 2 commands in the menu bar in Lwuit or Native J2ME

I added 2 commands to my form in lwuit.

form.addCommand(test);
form.setBackCommand(exitCommand);

I changed the command behavior to COMMAND_BEHAVIOR_NATIVE, so i can show the status, and my commands appear at the bottom too, but they appear exit at the right ..and test Command in the middle. I want to show only 2 commands layout in the menu bar, Exit on the right and options list that contains test on the left. How can i do that?

Upvotes: 2

Views: 453

Answers (2)

Mun0n
Mun0n

Reputation: 4437

First get the back Command and remove it. After this, add the exit Command like a standard Commandwith addCommand. Try this, if this doesn´t work we can try something else.

Upvotes: 1

mr_lou
mr_lou

Reputation: 1920

I don't know about LWUIT since I've never used it, but with native JavaME you sadly have no control of this. It is the individual device that decides where to place the commands.

You can move them around by changing the priority parameter, and you may be able to achieve an acceptable result that way, but only on some devices. The same code will give a different result on other devices.

Upvotes: 0

Related Questions