-
Notifications
You must be signed in to change notification settings - Fork 2
Events
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.
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.
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.