01-27-2013 10:10 AM
Hello,
How to create one event for where to pressed button back?
I some test the examples but never running!
cumps
Solved! Go to Solution.
01-27-2013 10:20 AM
I am not sure what you mean by button back.
If you want to know when a Button is pressed, then you are best coding a FieldChangedListener for the Button.
Let us know if this is not enough information for you.
01-27-2013 11:01 AM
Button back is the button with the back arrow.
01-27-2013 01:03 PM
If you are using the MainScreen, then you can override keyChar, and look for the ESCAPE character. here is some sample code:
protected boolean keyChar(char character, int status, int time) {
// regardless of where we are, Esc will exit
switch (character) {
case Characters.ESCAPE:
close();
return true;
default:
return super.keyChar(character, status, time);
}
}
01-27-2013 01:10 PM
Yes, this is it!
Thanks