vinay vyas
vinay vyas

Reputation: 491

SwipeRefreshLayout on a LinearLayout?

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?

Upvotes: 16

Views: 5612

Answers (1)

Ishaan Garg
Ishaan Garg

Reputation: 3093

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">

Upvotes: 33

Related Questions