安卓:我如何将一个滚动型(用文字)到画廊? [英] Android: How do I place a ScrollView (with text in) into Gallery?
问题描述
我要放置文本画廊Android应用程序。该文是在一个滚动视图。一切工作正常,但在draging向右或向左,没有翻页/元素显示(屏幕仍然还在)。如果我有滚动视图之外的一些东西,则切换到下一个元素上拖动文本。
I am going to place text in gallery in android app. The text is in a scrollView. Everything works fine but on draging the text towards right or left, no next page/ element shows (The screen remains still).If i have some thing outside the scrollView, it changes to the next element on dragging.
谁能帮助?
推荐答案
我明白你的问题。这种情况已经被我重写方法后处理。我不知道这将是最好的解决办法,可能是有人有更多的有效的解决方案,然后这一点,但它为我工作。
I understand your question. This situation is already handle by me after overriding method. I am not sure this will be the best solution, may be some one have more efficient solution then this, But it works for me.
我用自定义库的对象与在缠身的方法。
public boolean isScrollingLeft(MotionEvent e1, MotionEvent e2) {
return e2.getX() > e1.getX();
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
return super.onFling(e1, e2, 0, velocityY);
}
这篇关于安卓:我如何将一个滚动型(用文字)到画廊?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!