我写的手势识别怎么只响应down,onshowpress,onLongpress啊? 如题。只响应这三个,其他三个不响应。而且轻轻一点就是这三个。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我把主要代码贴出来,大家帮忙看看撒。public class GameView extends surfaceView implements OnGestureListener,OnTouchListener{private GestureDetector mGestureDetector; mGestureDetector=new GestureDetector(this); this.setLongClickable(true); this.setOnTouchListener(this);// 将本类绑定触屏监听器 mGestureDetector.setIsLongpressEnabled(true); public boolean onTouchEvent(MotionEvent event) { if(event.getAction()==MotionEvent.ACTION_UP){ .... }else{ if(...){ mGestureDetector.onTouchEvent(event); } } } 后面是六个函数。} android模拟器界面很大,怎么缩小? avd运行时报nullPointException AES 在不同平台下的加密和解密错误 android关于获取手机工程参数 打 patch android 如何自动打开GPS sql server to sqlite问题 android zxing扫描pdf417二维码 Android 为什么我的PullListView只能向下滑动,不能向上滑动加载更多??? 新手有问题,为什么出现空指针异常,求帮忙看看 怎么把图片转换为byte[] android2.2 播放.MP4格式视频出现丢帧、卡,大家看看给点建议
this.setLongClickable(true);
this.setOnTouchListener(this);// 将本类绑定触屏监听器
mGestureDetector.setIsLongpressEnabled(true); public boolean onTouchEvent(MotionEvent event) {
if(event.getAction()==MotionEvent.ACTION_UP){
....
}else{
if(...){
mGestureDetector.onTouchEvent(event);
}
}
}
后面是六个函数。
}