SwipeRefreshLayout Got Action_Move hangs on view

I have a regular NavigationDrawer with various fragments:

  • news
  • other material 1
  • other material 2
  • Installation

Problem:

NewsFragment contains a SwipeRefreshLayout. It works great the first time I update.

I can change the fragment to other elements 1 and 2 and Setting. Therefore, I return to NewsFragment.

And now, when I update, the fragment freezes.

DrawerLayout works correctly (open / close, even changing the name of the ActionBar), but the main fragment remains in the NewsFragment, and I can not scroll. But scollListner works (I have a log), but the view does not change.

No refreshView (swipeRefreshLayout at the top), no scroll, response buttons (in focus, onclick), but only visually.

, .

ADBLog:

SwipeRefreshLayout﹕ Got ACTION_MOVE event but don't have an active pointer id.

?

, .

+4
3

, . , , ( , ).

XML, SwipeRefreshLayout ():

<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/news_container_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
android:background="@color/news_background">

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/news_list_recycle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:dividerHeight="5dp" />


    <ProgressBar
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/news_progress"
        android:visibility="invisible"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true" />


</RelativeLayout>

, , ( ) :

, progressBar RelativeLayout rootView.

:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ProgressBar
    style="?android:attr/progressBarStyleLarge"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/news_progress"
    android:visibility="invisible"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true" />

<android.support.v4.widget.SwipeRefreshLayout
    android:id="@+id/news_container_refresh"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="5dp"
    android:background="@color/news_background">


    <android.support.v7.widget.RecyclerView
        android:id="@+id/news_list_recycle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:dividerHeight="5dp" />

</android.support.v4.widget.SwipeRefreshLayout>

, - .

+11

. onPause().

0

. v21.

, , , , SwipeRefreshLayout .

RelativeLayout SwipeRefreshLayout , ListView/RecyclerView SwipeRefreshLayout. , , LinearLayout .

, :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
        <android.support.v4.widget.SwipeRefreshLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent">
                    <!-- List, Layout etc -->
        </android.support.v4.widget.SwipeRefreshLayout>
</RelativeLayout>
-1
source

All Articles