Commit 6f80442b authored by Varun Patil's avatar Varun Patil

Restore refreshing

parent 92fcee4a
......@@ -141,14 +141,14 @@ public class BodyFragmentNew extends BackHandledFragment implements TransitionTa
updateBody();
/*bodySwipeRefreshLayout = getActivity().findViewById(R.id.body_swipe_refresh_layout);
bodySwipeRefreshLayout = getActivity().findViewById(R.id.body_swipe_refresh_layout);
bodySwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
bodyDisplayed = false;
updateBody();
}
});*/
});
Toolbar toolbar = getActivity().findViewById(R.id.toolbar);
toolbar.setTitle(min_body.getBodyName());
......@@ -171,15 +171,13 @@ public class BodyFragmentNew extends BackHandledFragment implements TransitionTa
body = bodyResponse;
displayBody();
}
/*if (bodySwipeRefreshLayout.isRefreshing())
bodySwipeRefreshLayout.setRefreshing(false);*/
bodySwipeRefreshLayout.setRefreshing(false);
}
}
@Override
public void onFailure(Call<Body> call, Throwable t) {
/*bodySwipeRefreshLayout.setRefreshing(false);*/
// Network Error
bodySwipeRefreshLayout.setRefreshing(false);
}
});
}
......
......@@ -42,11 +42,18 @@
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/body_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.RecyclerView
android:id="@+id/body_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.design.widget.CoordinatorLayout>
<RelativeLayout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment