-1
誰能告訴我如何在CustomDialog
或Dialog
Theme
活動中獲得一扔動作事件。我嘗試過implementing GestureDetector.OnGestureListener
,但它甚至不認識觸摸。有什麼建議麼 ??一字排開內部對話框Android
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..
}
請說明你做了什麼。 –