Commit 1e658043 authored by Varun Patil's avatar Varun Patil

Add loading spinner to notifications

parent 692277e4
......@@ -75,6 +75,12 @@ public class NotificationsFragment extends BaseFragment {
}
private void showNotifications(final List<Notification> notifications) {
/* Check if activity is done with */
if (getActivity() == null) return;
/* Hide loader */
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
NotificationsAdapter notificationsAdapter = new NotificationsAdapter(notifications, new ItemClickListener() {
@Override
public void onItemClick(View v, int position) {
......
......@@ -9,4 +9,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<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>
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