How may I use touch gestures to scroll through a series of pictures?

前端 未结 2 1073
無奈伤痛
無奈伤痛 2021-01-25 07:01

How can I create a gesture activity in Blackberry in such a way that images appear one after another on different screens ? Can anybody explain me with an example ? I want the

2条回答
  •  忘了有多久
    2021-01-25 07:28

    use the below code to find the touchGESTURE.

    protected boolean touchEvent(TouchEvent message) 
    {
       switch(message.getEvent()) 
       {
          case TouchEvent.GESTURE:
             TouchGesture gesture = message.getGesture();
             switch(gesture.getEvent()) 
             {
               case TouchGesture.NAVIGATION_SWIPE:
                 Dialog.alert("Swipe direction: " + gesture.getSwipeDirection()  
                 +            ", "
                 +            "\nMagnitude: " + gesture.getSwipeMagnitude());
                 return true;
             }
       }
       return false;
    }
    

    for more info visit Swipe_gestures_trackpad

提交回复
热议问题