How can I get the 'loading...' actionbar header to consume all touch events?
The reason it doesn't to begin with is due to how the View
is added to the Window
. When PullToRefreshAttacher
creates the WindowManager.LayoutParams
used for calling WindowManager.addView(View, LayoutParams)
, it uses the flag:
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
Which as per the docs indicates:
Window flag: this window can never receive touch events.
So, if you want the header view to consume touch events, you'll have to modify the PullToRefreshAttacher
and remove this flag.