开发者

Arrow Keys Problem in Blackberry

Currently i am working on开发者_如何学JAVA 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.


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;
  }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜