If we develop a BlackBerry Application, we always need to override ESCAPE character, this mean we want to add our script when user push ESCAPE button in their BlackBerry device. This is just a simple way how to override it.
protected boolean keyChar(char arg0, int arg1, int arg2) {
if((Characters.ESCAPE == arg0) && (!lblCurrentPath.getText().equals(FileExplorerLib.BASEPATH))){
/* Locate your script here... */
return true;
}
else
return super.keyChar(arg0, arg1, arg2);
}
You must locate that script in class that extend MainScreen.
Filed under: Algorithm and Programming, blackberry override button
