title: When switch fragment with SwipeRefreshLayout during refreshing, fragment freezes but actually still work
body: <p><strong>UPDATE: I thought it worked correctly. But after some test trouble still exists *sniff*</strong></p>
  
  <p>Then I made a simpler version to see what exactly happen and I get to know that the refreshing fragment which should have been detached still left there. Or exactly, the view of the old fragment left there, <strong>on top of</strong> the newer fragment. Since RecyclerView's background of my original app is not transparent, so It turned out what I said before.</p>
  
  <p><strong>END OF UPDATE</strong></p>
  
  <hr>
  
  <p>I have a <code>MainActivity</code> with layout like this:</p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout"
  android:layout_width="match_parent" android:layout_height="match_parent"&gt;
  
      &lt;!-- As the main content view, the view below consumes the entire
           space available using match_parent in both dimensions. --&gt;
      &lt;FrameLayout android:id="@+id/container" android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;!-- android:layout_gravity="start" tells DrawerLayout to treat
           this as a sliding drawer on the left side for left-to-right
           languages and on the right side for right-to-left languages.
           If you're not building against API 17 or higher, use
           android:layout_gravity="left" instead. --&gt;
      &lt;!-- The drawer is given a fixed width in dp and extends the full height of
           the container. --&gt;
      &lt;fragment android:id="@+id/navigation_drawer"
          android:layout_width="@dimen/navigation_drawer_width" android:layout_height="match_parent"
          android:layout_gravity="start" tools:layout="@layout/fragment_navigation_drawer" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>The fragment <code>ContentView</code> I use to fill <code>@id/container</code> is configured as:</p>
  
  <pre><code>&lt;android.support.v4.widget.SwipeRefreshLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/contentView"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/tweet_list"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/grey_300"/&gt;
  
  &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
  </code></pre>
  
  <p>And here is <code>onCreateView()</code> of <code>ContentView</code></p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      View inflatedView = inflater.inflate(R.layout.fragment_content, container, false);
  
      mRecyclerView = (RecyclerView) inflatedView.findViewById(R.id.tweet_list);
      mRecyclerView.setHasFixedSize(false);
  
      mLinearLayoutManager = new LinearLayoutManager(getActivity().getApplicationContext());
      mRecyclerView.setLayoutManager(mLinearLayoutManager);
  
      mTweetList = new ArrayList&lt;Tweet&gt;;
      mAdapter = new TweetAdapter(mTweetList);
      mRecyclerView.setAdapter(mAdapter);
      mRecyclerView.setItemAnimator(new DefaultItemAnimator());
  
      mSwipeRefreshLayout = (SwipeRefreshLayout) inflatedView.findViewById(R.id.contentView);
      mSwipeRefreshLayout.setOnRefreshListener(
          ...
      );
      return inflatedView;
  }
  </code></pre>
  
  <p>Then in <code>MainActivity</code> I switch the content to display by switching different <code>ContentView</code>. All looks good except one thing: when I switch <code>ContentView</code> fragments DURING refreshing by navigation drawer, then content freezes. But actually all things work as usual except you cannot see it.</p>