SwipeRefreshLayout loading circle is not hiding in Android
<p>I am developing an Android app. I am using listview together with SwipefreshLayout. But when I refresh list view using SwipefreshLayout , the loading circle is never hidden back. I am using it in fragment.</p>

<p>This is layout file</p>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;
        &lt;android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/swipe_refresh_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"&gt;

            &lt;!-- place your view here --&gt;

            &lt;ListView
                android:dividerHeight="@dimen/list_item_divider_height"
                android:padding="@dimen/list_padding"
                android:divider="@color/whitesmoke"
                android:id="@+id/listview_podcast_list"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;&lt;/ListView&gt;

        &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;

        &lt;TextView
            android:layout_below="@+id/swipe_refresh_layout"
            android:textSize="17dp"
            android:textStyle="bold"
            android:textColor="@color/black"
            android:textAlignment="center"
            android:id="@+id/tf_no_records"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" /&gt;

&lt;/RelativeLayout&gt;
</code></pre>

<p>This is how I am using it in fragment</p>

<pre><code>public class PodcastListFragment extends Fragment implements SwipeRefreshLayout.OnRefreshListener {
    // property variables here

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {


.
.
.

refresher = (SwipeRefreshLayout)view.findViewById(R.id.swipe_refresh_layout);
        refresher.setOnRefreshListener(this);

return view;

}

@Override
    public void onRefresh() {
        refreshListView();
    }

}
.
.
.
}
</code></pre>

<p>The loading circle is never get hidden back as in screenshot below</p>

<p><a href="https://i.stack.imgur.com/GKntC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GKntC.png" alt="enter image description here"></a></p>

<p>What is wrong with my code and how can I solve it?</p>