我使用手势检测器捕捉“甩”和使用视图脚蹼改变屏幕时出现这种情况。我的一些子视图包含列表视图。如果你刷卡列表视图的姿态探测器不会承认轻扫。但是,它可以识别它,如果它是的TextView的或的ImageView的ontop的。有没有实现它,使其认识到刷卡,即使他们对具有ClickListener另一种观点之上的方式?

有帮助吗?

解决方案

感谢您的回答。为了得到这工作,我怎么想都是我不得不补充的是:

myList.setOnTouchListener(gestureListener);

对于每个我列表。现在他们正确地识别水平划动,以改变看法,和垂直运动用于滚动列表。

其他提示

从这里的一个例子: HTTP:// android-developers.blogspot.com/2009/10/gestures-on-android-16.html

<android.gesture.GestureOverlayView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/gestures"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"    
    android:gestureStrokeType="multiple"
    android:eventsInterceptionEnabled="true"
    android:orientation="vertical">
<ListView
    android:id="@android:id/list"  
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"  />
</android.gesture.GestureOverlayView>

我用这个教程看Android的手势覆盖图。此来自例如具有利用该GestureOverlayView滚动列表一个ListView。

scroll top