I have a ViewPager (supported by AbstractBrowsePagerAdapter) consisting of fragments. Each fragment inflates the layout using SwipeRefreshLayout as the root. I recently updated the support-v4 library: 21.0.0. The new SwipeRefreshLayout uses a circle progress bar instead of a linear vertical progress bar, as shown in the screenshot below.
When I pull to refresh, swipe right, create a new fragment in the ViewPager with the same index as the one I pulled for the update, and then go to this new fragment, the previous view still appears on top of my new content.

As you can see in the screenshot, the text view βempty catalogβ and βcircle progress barβ still appear from the previous fragment that was destroyed.
- This only happens when SwipeRefreshLayout is in boot state (the bootloader is displayed on the screen)
- This does not happen with a previous version of SwipeRefreshLayout
- The hierarchyviewer tool does not work when an error occurs. It works before that, it works if I restart the application, but does not work when in the listening state.
- When I reset the view using DDMS, the views from the previous snippet are not displayed.
This seems like a bug in the new SwipeRefreshLayout, but I could not find anyone having the same problem, and it does not seem to be reported about https://code.google.com/p/android/issues/list?can=1&q = SwipeRefreshLayout & colspec = ID + Type + Status + Owner + Summary + Stars & cells = tiles
I am looking for a workaround that makes the views from the previous fragment be removed forever.
source share