I have an app with a SwipeRefreshLayout
which has a ListView
inside it. When the ListView
is populated, I can easily scroll down to read the older items on the list, but when I try to scroll up this action is mistaken for a Pull2Refresh action even though I am trying to scroll up. It does not matter where I position my finger it still mistakes this for a Pull2Refresh action. How can I sort this problem as scrolling back to the top is a problem.
Here is the XML to that fragment with the SwipeRefreshLayout
:
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_refresh_layout_general"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.inc.automata.unamupdates.fragments.GeneralNewsFragment">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/listViewGeneral">
</ListView>
</FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout>