For mapping the Command.Back
and the Command.Exit
to the bottom right corner of the screen:
Only Commands of type Command.BACK
and Command.EXIT
can be assigned to the Back button.
Back button always has a default icon which cannot be overridden and only one command (the one with the highest priority) can be mapped to the back button at a time. Other commands will be assigned to action button 2 under the options menu.
If multiple command exist the Command.BACK
with the highest priority will be assigned to the Back button.
If no Command.BACK
are assigned then the Command.EXIT
with the highest priority will be assigned
to the Back button
If there are no Commands of type BACK or EXIT, the Back button is not visible at all.
The back button can be removed by removing all BACK and EXIT Commands
with the method removeCommand(Command cmd)
.
Constructor Detail
public Command(String label, int commandType, int priority)
Usage
/*Creates two commands that are mapped to back button and action button 2 according to the rules above.*/ private Command backCommand = new Command(“Back”, Command.BACK,0); private Command ExitCommand = new Command(“Exit”, Command.EXIT,0);
This is the same way to assign commands as it is in non-touch and touch and type devices when assigning command to the Softkey 2 (right softkey). With the exception that Commands STOP and CANCEL cannot be assigned to the back button in full touch devices.