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"
xmlns:tools="http://schemas.android.com/tools"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.MessMenuFragment">
android:layout_height="match_parent">
<Spinner
android:id="@+id/hostel_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:paddingBottom="12dp"
android:paddingLeft="16dp"
android:theme="@style/AppTheme" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/mess_menu_swipe_refresh_layout"
<LinearLayout
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.MessMenuFragment">
<android.support.v7.widget.RecyclerView
android:id="@+id/mess_menu_recycler_view"
<Spinner
android:id="@+id/hostel_spinner"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:paddingBottom="12dp"
android:paddingLeft="16dp"
android:theme="@style/AppTheme" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/mess_menu_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.MessMenuFragment">
<android.support.v7.widget.RecyclerView
android:id="@+id/mess_menu_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<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"
xmlns:tools="http://schemas.android.com/tools"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.ProfileFragment">
android:layout_height="match_parent">
<LinearLayout
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/user_profile_picture_profile"
android:layout_width="135dp"
android:layout_height="99dp"
android:layout_margin="32dp" />
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.ProfileFragment">
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:orientation="vertical">
<TextView
android:id="@+id/user_name_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="@+id/user_rollno_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:textSize="16sp" />
android:orientation="horizontal">
<TextView
android:id="@+id/user_email_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:textSize="16sp" />
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/user_profile_picture_profile"
android:layout_width="135dp"
android:layout_height="99dp"
android:layout_margin="32dp" />
<TextView
android:id="@+id/user_contact_no_profile"
android:layout_width="match_parent"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:textSize="16sp" />
android:layout_marginTop="32dp"
android:orientation="vertical">
<TextView
android:id="@+id/user_name_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="@+id/user_rollno_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:textSize="16sp" />
<TextView
android:id="@+id/user_email_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:textSize="16sp" />
<TextView
android:id="@+id/user_contact_no_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/role_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/role_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/colorPrimaryDark">
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/colorPrimaryDark">
<android.support.design.widget.TabItem
android:id="@+id/following_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Following" />
<android.support.design.widget.TabItem
android:id="@+id/following_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Following" />
<android.support.design.widget.TabItem
android:id="@+id/events_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Events" />
<android.support.design.widget.TabItem
android:id="@+id/events_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Events" />
</android.support.design.widget.TabLayout>
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
</LinearLayout>
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent"
android:gravity="center" >
</LinearLayout>
<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