Android图库点击上没有滚动 [英] android gallery no scroll on click
本文介绍了Android图库点击上没有滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在默认情况下看来,点击一个画廊项目时,旁听席上自动滚动到中心单击的项目。我怎么能覆盖这个行为?我不想图库点击时滚动到中心,我希望它留在哪里。
By default it seems, when a gallery item is clicked, the gallery automatically scrolls to center the item that was clicked. How can I override this behavior? I do not want the gallery to scroll to center when clicked, I want it to stay where it is.
推荐答案
我觉得这是一个正确的解决办法:
I think this is a correct solution:
@Override
public boolean onSingleTapUp(final MotionEvent e) {
boolean handled = super.onSingleTapUp(e);
onDown(e);
return handled;
}
这篇关于Android图库点击上没有滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文