Action button 1

Only Commands of type Command.OK or IconCommand can be assigned to action button 1.

  • Command/IconCommand with the highest priority will be assigned to action button 1, other commands will be assigned to action button 2 (under the Options menu). If IconCommands are mapped to action button 2 (due to lower priority) then only their text labels appear under the options menu.

  • If no proper commands are assigned the action button 1 will not be visible.

Note: Priority values are integers, where a lower number indicates higher priority.

If no proper commands are assigned, action button 1 will not be visible.

Constructor detail

Public Command(String label, int commandType, int priority)

Usage

/*Creates a command with the type OK and the priority of 1 which is mapped to action button 1 with the icon. If a command (type OK or IconCommand) of higher priority is present, this command will be mapped to action button 2 with the label “OK”. */
	private Command okCommand = new Command(“OK”, Command.OK, 1);

This is similar to assigning commands to the Selection Key (middle softkey) in non-touch, and touch and type devices. In full touch devices, the Command ITEM cannot be assigned to the action button 1 but can be assigned to action button 2 (under the Options menu).