* An example fragment, the central view in MainActivity, for showing a list, should be replaced by a standard fragment with a custom recyclerView, create one different class for different views
* This class is a fragment for a list screen used in the main activity by the page viewer for events, jobs, it will use the given page position to tell which one it is
*/
publicclassListFragmentextendsFragment{
intpagePosition;//the fragments page in the pageview of the main activity
RecyclerViewrecyclerView;
EventsListAdapterrecylcerAdaper;
RecyclerView.LayoutManagerrecyclerLayoutAdapter;
privateintpagePosition;//the fragments page in the pageview of the main activity
protectedResponse<String>parseNetworkResponse(NetworkResponseresponse){//Note: the parseNetworkResponse is only called if the response was successful (codes 2xx), else parseNetworkError is called.
if(response!=null){
Log.e("request","fetch jobs status Code: "+response.statusCode);
* Will fetch the user from the api if we have an access token. ie Token -> User. Data is stored in the current userinfo (UserInfo.current). Overwrites the current user info if it exists