Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/186.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android onFling方法在扫描图像时未调用Gallery_Android - Fatal编程技术网

Android onFling方法在扫描图像时未调用Gallery

Android onFling方法在扫描图像时未调用Gallery,android,Android,我的画廊课被画廊延长了。onSwipe onFling方法未被调用需要执行的操作 代码如下 public MyGallery(PhotoAlbumDetailActivity context) { super(context); this.context = context; this.setFadingEdgeLength(0); //this.setSpacing(10); } public boolean onFli

我的画廊课被画廊延长了。onSwipe onFling方法未被调用需要执行的操作

代码如下

public MyGallery(PhotoAlbumDetailActivity context) {
        super(context);
        this.context = context;
        this.setFadingEdgeLength(0);
        //this.setSpacing(10);
    }

public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
  System.out.println("On Fling");
  return true;
}
在我的主要活动中 this.mConverseGallery=新的ConverseGallery(this)

onFling()
方法必须返回布尔值:

public MyGallery(PhotoAlbumDetailActivity context) {
    super(context);
    this.context = context;
    this.setFadingEdgeLength(0);
    //this.setSpacing(10);
}

public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
    Log.i("test", "onFling()");
    return super.onFling(e1, e2, velocityX, velocityY);
}

你有手势检测器或什么的吗?是的,我做了对不起..刚刚编辑了我的问题,看它仍然没有被称为onFling();我需要为此设置任何侦听器吗?我不明白它在这里不起作用?实际上,在使用Android SDK时,你不应该使用
System.out.println
,而是