Commit 91f75509 authored by Varun Patil's avatar Varun Patil

Add loading progress spinner to most fragments where necessary

parent c8b9e97c
......@@ -277,6 +277,8 @@ public class BodyFragment extends Fragment {
});
childrenRecyclerView.setAdapter(childrenAdapter);
childrenRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
/**
......
......@@ -162,6 +162,8 @@ public class CalendarFragment extends BaseFragment {
});
eventRecyclerView.setAdapter(eventAdapter);
eventRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
}
......@@ -144,6 +144,7 @@ public class FeedFragment extends BaseFragment {
}
}
});
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
private class updateDatabase extends AsyncTask<List<Event>, Void, Integer> {
......
......@@ -146,6 +146,7 @@ public class MessMenuFragment extends BaseFragment {
}
}
});
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
private class updateDatabase extends AsyncTask<List<HostelMessMenu>, Void, Integer> {
......
......@@ -110,6 +110,7 @@ public class NewsFragment extends BaseFragment {
}
}
});
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
private void openWebURL(String URL) {
......
......@@ -111,6 +111,7 @@ public class PlacementBlogFragment extends BaseFragment {
}
}
});
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
private void openWebURL(String URL) {
......
......@@ -123,6 +123,8 @@ public class ProfileFragment extends BaseFragment {
userRollNumberTextView.setText(user.getUserRollNumber());
userEmailIDTextView.setText(user.getUserEmail());
userContactNumberTextView.setText(user.getUserContactNumber());
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
......
......@@ -111,6 +111,7 @@ public class TrainingBlogFragment extends BaseFragment {
}
}
});
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
}
private void openWebURL(String URL) {
......
......@@ -189,4 +189,16 @@
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</FrameLayout>
\ No newline at end of file
......@@ -73,4 +73,16 @@
android:src="@android:drawable/ic_input_add"
android:tint="@android:color/black" />
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -26,4 +26,16 @@
android:layout_margin="16dp"
android:src="@android:drawable/ic_input_add"
android:tint="@android:color/black" />
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -26,4 +30,17 @@
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -16,4 +16,16 @@
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</RelativeLayout>
......@@ -16,4 +16,16 @@
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -85,4 +89,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -16,4 +16,16 @@
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</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