16

On a ListView, the SwipeRefreshLayout works fine. However, on a LinearLayout only (without ListView) the behaviour is bizarre. The SwiperefreshLayout's progress bar doesn't appear completely, in fact, it just appears for a fraction of second. What can the issue be?

sHOLE
  • 343
  • 4
  • 15
vinay vyas
  • 491
  • 1
  • 4
  • 17

1 Answers1

33

In your LinearLayout which is inside the SwipeRefreshLayout, set android:clickable="true"

<LinearLayout
        android:id="@+id/dummy_view"
        android:clickable="true"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
sHOLE
  • 343
  • 4
  • 15
Ishaan Garg
  • 3,014
  • 3
  • 25
  • 28