how to disable fling in android gallery

会有一股神秘感。 提交于 2019-11-29 12:02:19
Ljdawson

A better approach (as described here) is to override the fling method in your custom gallery class:

@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
                       float velocityY) {        
    return false;
}

Oh, got it!

In my custom gallery class:

@Override
public boolean onTouchEvent(MotionEvent event) {
    return false;

}

Figured that put from the gallery source code posted here: http://www.devdaily.com/java/jwarehouse/android/core/java/android/widget/Gallery.java.shtml

:)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!