开发者

how to disable gallery view scrolling [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

hi i want to disable ga开发者_开发百科llery view scrolling when we select particular item in gallery view.\ how do i do that. kindly help me out.


Write your own gallery class that extends Gallery. Override the onFling method with something like this :

public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY){
if (itemIsSelected)
    return true;
else return super.onFling(e1, e2, velocityX, velocityY);
}

set the the itemIsSelected flag in your onItemClickListener.

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜