PullToRefreshListView onTouch event is not working for parent activity

343 Views Asked by At

I have implemented PullToRefreshListView in one fragment.Now the activity which contains this fragment has its onTouch event.But if the touch is on PullToRefreshListView , the onTouch event of activity is not being called.How do i call Activity's onTouch if the touch event is not meant for PullToRefreshListView.

https://github.com/chrisbanes/Android-PullToRefresh

1

There are 1 best solutions below

0
On

onTouch() is a callback method that is set via the onTouchListener() to let a View listen to touch events. Activities and Fragments are not Views. You will need to set the listener to the corresponding View. A good place to do this is on onCreate() in the Activity and in onCreateView() on the Fragment.