2010-07-14 6 views
1

Actuellement, je travaille sur Blackberry Application et bloqué à ce point que comment accéder aux touches fléchées droite et gauche pour générer des événements contre ceux-ci. Je serai très reconnaissant envers toi.Arrow Keys Problème dans Blackberry

Répondre

1
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

Merci beaucoup pour votre aide. – Farhan