Skip to content
Sean Lane edited this page Aug 26, 2018 · 1 revision

Summary

Events are shown as a Fragment in the BottomNavigationView. Events are a list of events happening at HackRU, such as sponsor talks, meals, and giveaways. Events are provided by LCS from Google Calendar.

Retrieval of Events

The list of events are retrieved from the dayof-events LCS endpoint. We use Retrofit to handle the request. We use GSON to convert the JSON response to Java objects. Then, the Java object response is wrapped inside a Resource object and given to EventsFragment.

The Resource object is a generic class used to contain both the data of the response as well as the status of the response (loading, failed, success). By giving EventsFragment a Resource object that contains both the response and the status, EventsFragment will be able to portray to the user whether the events are loading, have successfully been loaded, or if there was a failure.

Portrayal of Events

After the list of events has been retrieved from LCS, they are shown with a RecyclerView. The RecyclerView uses the EventsAdapter to bind the event data to each list item.

Clone this wiki locally