How to specify the placement of a command on lwuit Form?
-
16-06-2021 - |
문제
I have a lwuit form. I wish to add my command to the right soft button.
I don't want to use Display.getInstance().reverseSoftButtons. How do i do it?
I came a across this method:
form.addCommand(myCommand, (int) );
What is the second parameter in the above method? How do i specify it? I tried putting in values like 1,3 but it gives me an exception. The documentation says it stands for offset. What is this offset and how do i specify it?
해결책
The second parameter is the offset within the array of commands, its in the javadoc.
You can add a blank "" command or use reverse softbuttons to get such an effect. In LWUIT 1.5 or newer you can also derive MenuBar and replace it using the UIManager API.
다른 팁
use form.setbackCommand() to add button to right sof key
form.setBackCommand();
제휴하지 않습니다 StackOverflow