Catatan Seorang Prajurit Kecil

Ikon

biarlah semua itu berjalan sesuai "skenario" NYA – jika kau telusuri, semua logika itu akan kau temukan

How to Override ESCAPE button in BlackBerry Device

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.

 

 

Iklan

Filed under: Algorithm and Programming,

Navigasi

Total Pengunjung

  • 111,657 hits