我怎么可能会使用触摸手势通过一系列的图片滚动? [英] How may I use touch gestures to scroll through a series of pictures?

查看:101
本文介绍了我怎么可能会使用触摸手势通过一系列的图片滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在图像出现一个又一个不同的屏幕上这样的方式创建黑莓手势活动?任何人都可以解释我用一个例子?我希望图像出现一个又一个的鼠标点击,从左侧拖动以及当作为右侧

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 images to appear one after another on the mouse click when dragged from left side as well as right side

推荐答案

使用下面的code找到touchGESTURE。

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

了解更多信息请访问<一个href=\"http://docs.blackberry.com/es-es/developers/deliverables/29251/Swipe_gestures_trackpad_1603027_11.jsp\"相对=nofollow> Swipe_gestures_trackpad

这篇关于我怎么可能会使用触摸手势通过一系列的图片滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆