title: Android swiperefreshlayout + framelayout
body: <p>I have the following problem: I have long <code>ListView</code>, but when I scroll back up the onRefresh is triggered instead of scrolling back to the top first. How can I fix this?</p>
  
  <pre><code>&lt;android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/refresh"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/splash_background"&gt;
  
      &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          android:id="@+id/container"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context=".MyActivity"
          tools:ignore="MergeRootFrame"&gt;&lt;/FrameLayout&gt;
  &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
  </code></pre>
  
  <p>I am inserting the following fragment into the <code>FrameLayout</code></p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@color/splash_background"&gt;
      &lt;ListView
          android:id="@+id/files_list"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>