Commit b9352151 authored by Varun Patil's avatar Varun Patil

Hide calendar while loading

parent 11012ec6
...@@ -35,6 +35,8 @@ import retrofit2.Call; ...@@ -35,6 +35,8 @@ import retrofit2.Call;
import retrofit2.Callback; import retrofit2.Callback;
import retrofit2.Response; import retrofit2.Response;
import static android.view.View.VISIBLE;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
*/ */
...@@ -122,6 +124,8 @@ public class CalendarFragment extends BaseFragment { ...@@ -122,6 +124,8 @@ public class CalendarFragment extends BaseFragment {
NewsFeedResponse newsFeedResponse = response.body(); NewsFeedResponse newsFeedResponse = response.body();
events = newsFeedResponse.getEvents(); events = newsFeedResponse.getEvents();
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
getView().findViewById(R.id.calendar_layout).setVisibility(VISIBLE);
try { try {
Date todayWithZeroTime = formatter.parse(formatter.format(today)); Date todayWithZeroTime = formatter.parse(formatter.format(today));
showEventsForDate(todayWithZeroTime); showEventsForDate(todayWithZeroTime);
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
android:id="@+id/calendar_layout" android:id="@+id/calendar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical"
android:visibility="gone">
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
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