I have implemented the new SwipeRefreshLayout component in my application and it works well with any vertical views like ListView , GridView and ScrollView .
This behaves very poorly with horizontal views, such as HorizontalScrollView . When you scroll left or right, the SwipeRefreshLayout caches the touch, prevents it from getting a HorizontalScrollView and starts scrolling vertically to complete the update.
I tried to solve this problem, as I previously solved the problems with the vertical ScrollView with the ViewPager inside using requestDisallowInterceptTouchEvent , but this did not work. I also noticed that this method is overridden in the original SwipeRefreshLayout class without returning super. Instead, Google developer commented " //Nope. " :)
Since the SwipeRefreshLayout component is relatively new, I could not find a solution that fixes the horizontal scroll problem, while allowing me to scroll the image to track and handle vertical scrolling, so I decided to share my solution with the hope that it would spare someone an hour or two .
android horizontalscrollview swiperefreshlayout
Lior Iluz Jun 02 '14 at 8:07 2014-06-02 08:07
source share