Commit d9436642 authored by Varun Patil's avatar Varun Patil

Add empty list animation

parent 4c582a05
...@@ -177,6 +177,13 @@ public class FeedFragment extends BaseFragment { ...@@ -177,6 +177,13 @@ public class FeedFragment extends BaseFragment {
View view = getActivity().findViewById(R.id.loadingPanel); View view = getActivity().findViewById(R.id.loadingPanel);
if (view != null) if (view != null)
view.setVisibility(View.GONE); view.setVisibility(View.GONE);
// Check if nothing was found
if (events.size() == 0) {
view = getActivity().findViewById(R.id.nothingFound);
if (view != null)
view.setVisibility(View.VISIBLE);
}
} }
private void initRecyclerView() { private void initRecyclerView() {
......
...@@ -29,5 +29,6 @@ ...@@ -29,5 +29,6 @@
android:visibility="invisible" /> android:visibility="invisible" />
<include layout="@layout/loading_panel" /> <include layout="@layout/loading_panel" />
<include layout="@layout/nothing_found" />
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nothingFound"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="320dp"
android:layout_height="320dp"
android:scaleType="fitCenter"
app:lottie_rawRes="@raw/nothing_found_anim"
app:lottie_loop="true"
app:lottie_autoPlay="true" />
</RelativeLayout>
This diff is collapsed.
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