Android: GestureDetector not working (gestureDetector.onTouchEvent(event) always false) with Tabs (TabActivity, Tabwidget)

前端 未结 2 1439
耶瑟儿~
耶瑟儿~ 2021-02-14 02:53

I have implemented my TabActivity with different child activities:

intent = new Intent().setClass(this, MyChildTabActiviy.class);
// Initialize a TabSpec for eac         


        
2条回答
  •  半阙折子戏
    2021-02-14 03:10

    As a complement to @Abhinav 's answer (that btw helped me too), I'd like to say that I think overriding onDown() is needed because its default implementation in SimpleOnGestureListener is to return false. Being ACTION_DOWN the first one to reach the listener, it would make it discard the event, whatever it is.

提交回复
热议问题