tags:

views:

14

answers:

1

Hi, Currently i am working on Blackberry Application and stuck at this point that how to access Right and Left Arrow Keys for generating events against these. I will be very Thankful to you.

+1  A: 
class LocationMain extends UiApplication {
  public LocationMain()
  {
      pushScreen(new LocTestScreen());
  }

  public static void main(String args[])
  {
      LocationMain app = new LocationMain();
      app.enterEventDispatcher();
  }
} 



 class LocTestScreen extends MainScreen {

  protected boolean navigationMovement(int dx, int dy, int status, int time) {
    if(dy < 0) 
        System.out.println("UP");
    if(dy > 0) 
        System.out.println("down");
    if(dx < 0) 
        System.out.println("left");
    if(dx > 0) 
        System.out.println("right");

    return false;
  }
}
oxigen
Thanks a lot for your Help.
Farhan