我使用的手势探测器捕捉甩,并使用视图的鳍状肢来改变屏幕时,出现这种情况。我的一些子视图包含列表视图。该手势检测不会识别刷卡,如果你刷卡的列表视图。但它会识别它,如果它是onTop的TextView的或的ImageView的。有没有一种方法来实现它,这样它会识别挥笔,即使他们是在另一种观点认为,有一个ClickListener的顶部?
I am using gesture detector to catch "flings" and using a view flipper to change the screen when this happens. Some of my child views contain list views. The the gesture detector wont recognize a swipe if you swipe on the list view. But it will recognize it if it is onTop of TextView's or ImageView's. Is there a way to implement it so that it will recognize the swipes even if they are on top of another view that has a ClickListener?
感谢您的回答。为了得到它的工作我怎么想它我不得不补充的是:
Thank you for your answer. In order to get it working how I wanted it to all I had to add was this:
myList.setOnTouchListener(gestureListener);
myList.setOnTouchListener(gestureListener);
,我的每个列表。现在他们正确识别为滚动列表水平挥笔改变看法,垂直运动。
for each of my lists. Now they correctly recognize horizontal swipes to change views, and vertical movement for scrolling the list.
上一篇:是否有可能访问Android的一个字符串数组项?有可能、数组、字符串、Android
下一篇:解压压缩文件给" java.util.zip.ZipException:无法读取版本"或QUOT; java.util.ZipException无法读取本地头版本45 QUOT;版