谁能告诉我如何在内部CustomDialog
或Dialog
Theme
活动中获得运动事件。我试过了implementing GestureDetector.OnGestureListener
,但它甚至不能识别触摸。有什么建议么 ??
GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener {
private GestureDetectorCompat mDetector;
Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mDetector = new GestureDetectorCompat(this, this);
}
@Override
public boolean onFling(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY) {
// i want to detect this return true; } etc etc..
}