Commit ac6cb774 authored by Roger Barton's avatar Roger Barton
Browse files

Lint

parent 4a14058e
...@@ -86,8 +86,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -86,8 +86,7 @@ public class MainActivity extends AppCompatActivity {
} }
/** /**
* Submit a pin for an event to the server and act on response accondingly, ie open scanActivity if valid, or request pin entry again * Submit a pin for an event to the server and act on response accordingly, ie open scanActivity if valid, or request pin entry again
* @param view
*/ */
public void SubmitPin(View view) public void SubmitPin(View view)
{ {
......
...@@ -17,13 +17,13 @@ import ch.amiv.android_app.R; ...@@ -17,13 +17,13 @@ import ch.amiv.android_app.R;
/** /**
* This activity is for displaying the list of signed in members, similar to what is seen in the checkin website in the other amiv checkin project. * This activity is for displaying the list of signed in members, similar to what is seen in the checkin website in the other amiv checkin project.
* Mostly handles updating the data by fetching from the server and then updating the listview. Note the list view is customised, ie the individual item, this is what the CustomListAdapter class and list_item_memberber.xml are for * Mostly handles updating the data by fetching from the server and then updating the listview. Note the list view is customised, ie the individual item, this is what the CustomListAdapter class and list_item_member.xml are for
*/ */
public class MemberListActivity extends AppCompatActivity { public class MemberListActivity extends AppCompatActivity {
RecyclerView mRecylerView; RecyclerView mRecyclerView;
RecyclerView.Adapter mRecylcerAdaper; RecyclerView.Adapter mRecyclerAdapter;
RecyclerView.LayoutManager mRecyclerLayoutAdapter; RecyclerView.LayoutManager mRecyclerLayoutAdapter;
private final Handler handler = new Handler(); //similar as in scanActivity, to keep refreshing the data private final Handler handler = new Handler(); //similar as in scanActivity, to keep refreshing the data
...@@ -71,19 +71,19 @@ public class MemberListActivity extends AppCompatActivity { ...@@ -71,19 +71,19 @@ public class MemberListActivity extends AppCompatActivity {
} }
else if(id == R.id.menuSort_Membership) { else if(id == R.id.menuSort_Membership) {
EventDatabase.instance.SetMemberSortingType(EventDatabase.MemberComparator.Membership); EventDatabase.instance.SetMemberSortingType(EventDatabase.MemberComparator.Membership);
mRecylcerAdaper.notifyDataSetChanged(); mRecyclerAdapter.notifyDataSetChanged();
} }
else if(id == R.id.menuSort_Status) { else if(id == R.id.menuSort_Status) {
EventDatabase.instance.SetMemberSortingType(EventDatabase.MemberComparator.Status); EventDatabase.instance.SetMemberSortingType(EventDatabase.MemberComparator.Status);
mRecylcerAdaper.notifyDataSetChanged(); mRecyclerAdapter.notifyDataSetChanged();
} }
else if(id == R.id.menuSort_Name) { else if(id == R.id.menuSort_Name) {
EventDatabase.instance.SetMemberSortingType(EventDatabase.MemberComparator.Name); EventDatabase.instance.SetMemberSortingType(EventDatabase.MemberComparator.Name);
mRecylcerAdaper.notifyDataSetChanged(); mRecyclerAdapter.notifyDataSetChanged();
} }
else if(id == R.id.menuSort_Legi) { else if(id == R.id.menuSort_Legi) {
EventDatabase.instance.SetMemberSortingType(EventDatabase.MemberComparator.Legi); EventDatabase.instance.SetMemberSortingType(EventDatabase.MemberComparator.Legi);
mRecylcerAdaper.notifyDataSetChanged(); mRecyclerAdapter.notifyDataSetChanged();
} }
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
...@@ -92,20 +92,20 @@ public class MemberListActivity extends AppCompatActivity { ...@@ -92,20 +92,20 @@ public class MemberListActivity extends AppCompatActivity {
private void InitialiseListView() private void InitialiseListView()
{ {
//=====Recycler View==== //=====Recycler View====
mRecylerView = findViewById(R.id.recyclerView); mRecyclerView = findViewById(R.id.recyclerView);
// use this setting to improve performance if you know that changes // use this setting to improve performance if you know that changes
// in content do not change the layout size of the RecyclerView // in content do not change the layout size of the RecyclerView
mRecylerView.setHasFixedSize(true); mRecyclerView.setHasFixedSize(true);
// use a linear layout manager // use a linear layout manager
mRecyclerLayoutAdapter = new LinearLayoutManager(this); mRecyclerLayoutAdapter = new LinearLayoutManager(this);
mRecylerView.setLayoutManager(mRecyclerLayoutAdapter); mRecyclerView.setLayoutManager(mRecyclerLayoutAdapter);
// specify an adapter (see also next example) // specify an adapter (see also next example)
mRecylcerAdaper = new MemberListAdapter(EventDatabase.instance.members, EventDatabase.instance.stats, EventDatabase.instance.eventData.GetInfosAsKeyValuePairs()); mRecyclerAdapter = new MemberListAdapter(EventDatabase.instance.members, EventDatabase.instance.stats, EventDatabase.instance.eventData.GetInfosAsKeyValuePairs());
mRecylerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(this, R.anim.layout_anim_falldown)); mRecyclerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(this, R.anim.layout_anim_falldown));
mRecylerView.setAdapter(mRecylcerAdaper); mRecyclerView.setAdapter(mRecyclerAdapter);
AnimateList(null); AnimateList(null);
} }
...@@ -130,18 +130,18 @@ public class MemberListActivity extends AppCompatActivity { ...@@ -130,18 +130,18 @@ public class MemberListActivity extends AppCompatActivity {
{ {
this.runOnUiThread(new Runnable() { this.runOnUiThread(new Runnable() {
public void run() { public void run() {
mRecylerView.invalidate(); mRecyclerView.invalidate();
mRecylerView.scheduleLayoutAnimation(); mRecyclerView.scheduleLayoutAnimation();
} }
}); });
} }
private void UpdateList() private void UpdateList()
{ {
if(mRecylerView == null) if(mRecyclerView == null)
InitialiseListView(); InitialiseListView();
mRecylcerAdaper.notifyDataSetChanged(); mRecyclerAdapter.notifyDataSetChanged();
} }
public void RefreshListData(View view) public void RefreshListData(View view)
......
...@@ -243,7 +243,6 @@ public class ScanActivity extends AppCompatActivity { ...@@ -243,7 +243,6 @@ public class ScanActivity extends AppCompatActivity {
/** /**
* Call this to submit a legi nr from a UI Element * Call this to submit a legi nr from a UI Element
* @param view
*/ */
public void SubmitLegiNrFromTextField(View view) public void SubmitLegiNrFromTextField(View view)
{ {
......
...@@ -20,8 +20,8 @@ import ch.amiv.android_app.R; ...@@ -20,8 +20,8 @@ import ch.amiv.android_app.R;
public class SearchMembersActivity extends AppCompatActivity { public class SearchMembersActivity extends AppCompatActivity {
RecyclerView mRecylerView; //for displaying the list of members in the same way as in the memberListActivity RecyclerView mRecyclerView; //for displaying the list of members in the same way as in the memberListActivity
RecyclerView.Adapter mRecylcerAdaper; RecyclerView.Adapter mRecyclerAdapter;
RecyclerView.LayoutManager mRecyclerLayoutAdapter; RecyclerView.LayoutManager mRecyclerLayoutAdapter;
public List<Member> searchResults = new ArrayList<Member>(); //This is the list of search results, will dynamically change size of course public List<Member> searchResults = new ArrayList<Member>(); //This is the list of search results, will dynamically change size of course
...@@ -74,7 +74,7 @@ public class SearchMembersActivity extends AppCompatActivity { ...@@ -74,7 +74,7 @@ public class SearchMembersActivity extends AppCompatActivity {
RunSearch(newText, false); RunSearch(newText, false);
if(newText.isEmpty()) { if(newText.isEmpty()) {
searchResults.clear(); searchResults.clear();
mRecylcerAdaper.notifyDataSetChanged(); mRecyclerAdapter.notifyDataSetChanged();
} }
} }
return false; return false;
...@@ -101,15 +101,15 @@ public class SearchMembersActivity extends AppCompatActivity { ...@@ -101,15 +101,15 @@ public class SearchMembersActivity extends AppCompatActivity {
private void InitialiseListView() //same as in the memberlistactivity private void InitialiseListView() //same as in the memberlistactivity
{ {
//=====Recycler View==== //=====Recycler View====
mRecylerView = findViewById(R.id.recyclerView); mRecyclerView = findViewById(R.id.recyclerView);
mRecylerView.setHasFixedSize(true); mRecyclerView.setHasFixedSize(true);
mRecyclerLayoutAdapter = new LinearLayoutManager(this); mRecyclerLayoutAdapter = new LinearLayoutManager(this);
mRecylerView.setLayoutManager(mRecyclerLayoutAdapter); mRecyclerView.setLayoutManager(mRecyclerLayoutAdapter);
mRecylcerAdaper = new SearchMembersListAdapter(searchResults); mRecyclerAdapter = new SearchMembersListAdapter(searchResults);
mRecylerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(this, R.anim.layout_anim_falldown)); //Here we give the searchResults array and use the SearchMemberListAdapter mRecyclerView.setLayoutAnimation(AnimationUtils.loadLayoutAnimation(this, R.anim.layout_anim_falldown)); //Here we give the searchResults array and use the SearchMemberListAdapter
mRecylerView.setAdapter(mRecylcerAdaper); mRecyclerView.setAdapter(mRecyclerAdapter);
AnimateList(null); AnimateList(null);
} }
...@@ -133,17 +133,17 @@ public class SearchMembersActivity extends AppCompatActivity { ...@@ -133,17 +133,17 @@ public class SearchMembersActivity extends AppCompatActivity {
searchResults.add(EventDatabase.instance.members.get(i)); searchResults.add(EventDatabase.instance.members.get(i));
} }
mRecylcerAdaper.notifyDataSetChanged(); mRecyclerAdapter.notifyDataSetChanged();
return true; return true;
} }
private void UpdateList() private void UpdateList()
{ {
if(mRecylerView == null) if(mRecyclerView == null)
InitialiseListView(); InitialiseListView();
if(!RunSearch(prevQuery, true)) if(!RunSearch(prevQuery, true))
mRecylcerAdaper.notifyDataSetChanged(); mRecyclerAdapter.notifyDataSetChanged();
} }
/** /**
...@@ -154,8 +154,8 @@ public class SearchMembersActivity extends AppCompatActivity { ...@@ -154,8 +154,8 @@ public class SearchMembersActivity extends AppCompatActivity {
{ {
this.runOnUiThread(new Runnable() { this.runOnUiThread(new Runnable() {
public void run() { public void run() {
mRecylerView.invalidate(); mRecyclerView.invalidate();
mRecylerView.scheduleLayoutAnimation(); mRecyclerView.scheduleLayoutAnimation();
} }
}); });
} }
......
...@@ -49,7 +49,6 @@ public final class ServerRequests { ...@@ -49,7 +49,6 @@ public final class ServerRequests {
/** /**
* Call this to check with the server if a pin is valid * Call this to check with the server if a pin is valid
* @return whether there is internet or not
* @param callback A function to execute when the response has been received * @param callback A function to execute when the response has been received
*/ */
public static void CheckPin (final Context context, final OnCheckPinReceivedCallback callback) public static void CheckPin (final Context context, final OnCheckPinReceivedCallback callback)
...@@ -102,7 +101,7 @@ public final class ServerRequests { ...@@ -102,7 +101,7 @@ public final class ServerRequests {
{ {
//Note: server will send a Json if the response is valid, ie the person has been checked in, else a string. This is to get the member type. Yet we still need to do a stringRequest //Note: server will send a Json if the response is valid, ie the person has been checked in, else a string. This is to get the member type. Yet we still need to do a stringRequest
StringRequest req = new StringRequest(Request.Method.POST, SettingsActivity.GetServerURL(context) + ON_SUBMIT_LEGI_URL_EXT StringRequest req = new StringRequest(Request.Method.POST, SettingsActivity.GetServerURL(context) + ON_SUBMIT_LEGI_URL_EXT
, new Response.Listener<String>() { @Override public void onResponse(String response) {}} //initalise with empty response listeners as we will handle the response in the parseNetworkResponse and parseNetworkError functions , new Response.Listener<String>() { @Override public void onResponse(String response) {}} //initialise with empty response listeners as we will handle the response in the parseNetworkResponse and parseNetworkError functions
, new Response.ErrorListener() {@Override public void onErrorResponse(VolleyError error) {}}) , new Response.ErrorListener() {@Override public void onErrorResponse(VolleyError error) {}})
{ {
@Override @Override
...@@ -159,7 +158,7 @@ public final class ServerRequests { ...@@ -159,7 +158,7 @@ public final class ServerRequests {
Log.e("postrequest", "Params sent: pin=" + MainActivity.CurrentPin + ", URL used: " + SettingsActivity.GetServerURL(context) + GET_DATA_URL_EXT); Log.e("postrequest", "Params sent: pin=" + MainActivity.CurrentPin + ", URL used: " + SettingsActivity.GetServerURL(context) + GET_DATA_URL_EXT);
JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, SettingsActivity.GetServerURL(context) + GET_DATA_URL_EXT, JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, SettingsActivity.GetServerURL(context) + GET_DATA_URL_EXT,
(JSONObject) null, new Response.Listener<JSONObject>() { null, new Response.Listener<JSONObject>() {
@Override @Override
public void onResponse(JSONObject response) { public void onResponse(JSONObject response) {
// Parsing json object response and save to the static memberDB, parse each part in a separate try catch, so we get as much info as possible // Parsing json object response and save to the static memberDB, parse each part in a separate try catch, so we get as much info as possible
...@@ -238,7 +237,7 @@ public final class ServerRequests { ...@@ -238,7 +237,7 @@ public final class ServerRequests {
requestQueue.add(req); requestQueue.add(req);
} }
/** // Note: Is currently commented out as the server side is giving us the eventData as part of the /gchecking_update_data json, however may change to be separate request, so it is only sent at the start of a session /** // Note: Is currently commented out as the server side is giving us the eventData as part of the /checking_update_data json, however may change to be separate request, so it is only sent at the start of a session
* Will update the event data, only call this when entering a session * Will update the event data, only call this when entering a session
* @param callback Use this callback for executing code when the data has been received * @param callback Use this callback for executing code when the data has been received
*/ */
......
...@@ -71,7 +71,6 @@ public class SettingsActivity extends AppCompatActivity { ...@@ -71,7 +71,6 @@ public class SettingsActivity extends AppCompatActivity {
} }
/** /**
* @param context
* @return Returns whether auto fetching data, to update list of members from the server, is allowed * @return Returns whether auto fetching data, to update list of members from the server, is allowed
*/ */
public static boolean GetAutoRefresh (Context context) public static boolean GetAutoRefresh (Context context)
...@@ -83,7 +82,6 @@ public class SettingsActivity extends AppCompatActivity { ...@@ -83,7 +82,6 @@ public class SettingsActivity extends AppCompatActivity {
} }
/** /**
* @param context
* @return Returns the saved refresh frequency for getting data from the server. The value set in the settings activity * @return Returns the saved refresh frequency for getting data from the server. The value set in the settings activity
*/ */
public static int GetRefreshFrequency (Context context) //returns in millisec, but is stored in sec public static int GetRefreshFrequency (Context context) //returns in millisec, but is stored in sec
......
...@@ -3,7 +3,7 @@ package ch.amiv.android_app.core; ...@@ -3,7 +3,7 @@ package ch.amiv.android_app.core;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
/** /**
* A class to simplify refreshsing a recyclerview, used in events and jobs list for example * A class to simplify refreshing a recyclerview, used in events and jobs list for example
*/ */
public abstract class BaseRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { public abstract class BaseRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
......
...@@ -144,7 +144,7 @@ public class ListFragment extends Fragment { ...@@ -144,7 +144,7 @@ public class ListFragment extends Fragment {
//Setup swipe down to refresh, adds the amiv logo and rotate animation //Setup swipe down to refresh, adds the amiv logo and rotate animation
private void InitSwipeRefreshUI() private void InitSwipeRefreshUI()
{ {
//Set on resfresh functionality //Set on refresh functionality
swipeRefreshLayout = getView().findViewById(R.id.swipeRefresh); swipeRefreshLayout = getView().findViewById(R.id.swipeRefresh);
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { //This sets what function is called when we swipe down to refresh swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { //This sets what function is called when we swipe down to refresh
@Override @Override
......
...@@ -70,7 +70,7 @@ public class LoginActivity extends AppCompatActivity { ...@@ -70,7 +70,7 @@ public class LoginActivity extends AppCompatActivity {
//Add the toolbar and back navigation //Add the toolbar and back navigation
Toolbar toolbar = findViewById(R.id.toolbar); Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
if(getSupportActionBar() != null)//XXX doesnt always work, ensure that the back arrow is visible if(getSupportActionBar() != null)//XXX doesn't always work, ensure that the back arrow is visible
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//Link UI elements to xml //Link UI elements to xml
...@@ -133,7 +133,7 @@ public class LoginActivity extends AppCompatActivity { ...@@ -133,7 +133,7 @@ public class LoginActivity extends AppCompatActivity {
SetSubmitButtonState(true, false); SetSubmitButtonState(true, false);
} }
//Store the detials in the current user, do this on the main thread to prevent multi thread errors, as several requests could be editing the userinfo at the same time otherwise //Store the details in the current user, do this on the main thread to prevent multi thread errors, as several requests could be editing the userinfo at the same time otherwise
if(json.has("user")) { if(json.has("user")) {
submitButton.post(new Runnable() { submitButton.post(new Runnable() {
@Override @Override
......
...@@ -232,9 +232,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -232,9 +232,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
/** /**
* Here we can interpret the result of the login/event detail activity, if the login was successful or not, then update accordingly * Here we can interpret the result of the login/event detail activity, if the login was successful or not, then update accordingly
* @param requestCode
* @param resultCode
* @param data
*/ */
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
...@@ -383,8 +380,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -383,8 +380,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
/** /**
* Used to reconnect the link to the fragment in onresume * Used to reconnect the link to the fragment in onresume
* @param fragment
* @param position
*/ */
public void ReconnectFragment(ListFragment fragment, int position){ public void ReconnectFragment(ListFragment fragment, int position){
try { try {
......
...@@ -32,7 +32,7 @@ import ch.amiv.android_app.events.Events; ...@@ -32,7 +32,7 @@ import ch.amiv.android_app.events.Events;
import ch.amiv.android_app.jobs.Jobs; import ch.amiv.android_app.jobs.Jobs;
/** /**
* A static class to do backround http requests to the amiv api. Access these requests anywhere * A static class to do background http requests to the amiv api. Access these requests anywhere
* Most requests have a callback, so you can execute code when the request has returned or failed * Most requests have a callback, so you can execute code when the request has returned or failed
* See API Docs to see what requests can be done: https://api.amiv.ethz.ch/docs or via github site https://github.com/amiv-eth/amivapi * See API Docs to see what requests can be done: https://api.amiv.ethz.ch/docs or via github site https://github.com/amiv-eth/amivapi
* *
...@@ -46,7 +46,7 @@ import ch.amiv.android_app.jobs.Jobs; ...@@ -46,7 +46,7 @@ import ch.amiv.android_app.jobs.Jobs;
* *
* To load images, don't use a request directly, use a networkImageView, which will handle everything for you including caching * To load images, don't use a request directly, use a networkImageView, which will handle everything for you including caching
* *
* Libary used for network stuff: volley, note: we use our own modified version of the libary as a git submodule * Library used for network stuff: volley, note: we use our own modified version of the library as a git submodule
*/ */
public final class Request { public final class Request {
private static RequestQueue requestQueue; private static RequestQueue requestQueue;
...@@ -82,9 +82,8 @@ public final class Request { ...@@ -82,9 +82,8 @@ public final class Request {
/** /**
* Will fetch the list of events from the server, note does not require an access token. * Will fetch the list of events from the server, note does not require an access token.
* @param errorCallback Use this to know when an error occured to stop loading animations etc * @param errorCallback Use this to know when an error occurred to stop loading animations etc
* @param eventId to only fetch for a specific event id add this, else set as emoty * @param eventId to only fetch for a specific event id add this, else set as empty
* @return True if the request was sent.
*/ */
public static void FetchEventList(final Context context, final OnDataReceivedCallback callback, final OnDataReceivedCallback errorCallback, @NonNull final String eventId) public static void FetchEventList(final Context context, final OnDataReceivedCallback callback, final OnDataReceivedCallback errorCallback, @NonNull final String eventId)
{ {
...@@ -174,7 +173,7 @@ public final class Request { ...@@ -174,7 +173,7 @@ public final class Request {
/** /**
* Will fetch the event signups for the current user and save them in the eventInfos list * Will fetch the event signups for the current user and save them in the eventInfos list
* @param eventId to only fetch for a specific event id add this, else set as emoty * @param eventId to only fetch for a specific event id add this, else set as empty
*/ */
public static void FetchEventSignups(final Context context, final OnDataReceivedCallback callback, final OnDataReceivedCallback errorCallback, @NonNull String eventId) public static void FetchEventSignups(final Context context, final OnDataReceivedCallback callback, final OnDataReceivedCallback errorCallback, @NonNull String eventId)
{ {
...@@ -525,7 +524,6 @@ public final class Request { ...@@ -525,7 +524,6 @@ public final class Request {
/** /**
* Will run the callback on the main thread, use this for easily executing callbacks, which do not have any additional code on the main thread * Will run the callback on the main thread, use this for easily executing callbacks, which do not have any additional code on the main thread
* @param callback
*/ */
private static void RunCallback (final OnDataReceivedCallback callback) private static void RunCallback (final OnDataReceivedCallback callback)
{ {
......
...@@ -115,7 +115,7 @@ public class Settings { ...@@ -115,7 +115,7 @@ public class Settings {
} }
/** /**
* Will return whether the user is only loggedd in with an email, if they do not have an api login, false if current user has not be initialised * Will return whether the user is only logged in with an email, if they do not have an api login, false if current user has not be initialised
*/ */
public static boolean IsEmailOnlyLogin(Context context){ public static boolean IsEmailOnlyLogin(Context context){
return !Settings.HasToken(context) && UserInfo.current != null && !UserInfo.current.email.isEmpty(); return !Settings.HasToken(context) && UserInfo.current != null && !UserInfo.current.email.isEmpty();
...@@ -132,7 +132,7 @@ public class Settings { ...@@ -132,7 +132,7 @@ public class Settings {
//region ---Language--- //region ---Language---
/** /**
* Will change the language, NOTE: Highly advised to restart the app/activty for changes to take effect. * Will change the language, NOTE: Highly advised to restart the app/activity for changes to take effect.
* New strings that are loaded will be in the correct language, but UI that is already created/still in memory will NOT change. * New strings that are loaded will be in the correct language, but UI that is already created/still in memory will NOT change.
* Returns true if the language has been changed * Returns true if the language has been changed
*/ */
......
...@@ -7,7 +7,7 @@ import android.os.Bundle; ...@@ -7,7 +7,7 @@ import android.os.Bundle;
import ch.amiv.android_app.BuildConfig; import ch.amiv.android_app.BuildConfig;
/** /**
* This is the launcher/splash activity, here we choose to start the main activty or begin the setup process depending on whether the user has done the setup or not (stored in settings) * This is the launcher/splash activity, here we choose to start the main activity or begin the setup process depending on whether the user has done the setup or not (stored in settings)
* For the UI we use a theme with the splash_screen, using a layout file is not possible as we have to display it while loading, need to use a basic xml, no inflation * For the UI we use a theme with the splash_screen, using a layout file is not possible as we have to display it while loading, need to use a basic xml, no inflation
* Theme is set in the manifest * Theme is set in the manifest
*/ */
......
...@@ -41,7 +41,6 @@ public class UserInfo implements Serializable{ ...@@ -41,7 +41,6 @@ public class UserInfo implements Serializable{
/** /**
* Used when the user only logs in with an email * Used when the user only logs in with an email
* @param email_
*/ */
public void Update(String email_){ public void Update(String email_){
email = email_; email = email_;
......
...@@ -68,7 +68,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -68,7 +68,7 @@ public class MainActivity extends AppCompatActivity {
//====Handling of the response of the request //====Handling of the response of the request
@Override @Override
protected Response<String> parseNetworkResponse(NetworkResponse response) { //this is called if we have received a reponse from the server with a successful status code, eg 2xx, not 4xx protected Response<String> parseNetworkResponse(NetworkResponse response) { //this is called if we have received a response from the server with a successful status code, eg 2xx, not 4xx
if(response != null) { if(response != null) {
Log.e("request", "fetch demo data status Code: " + response.statusCode); Log.e("request", "fetch demo data status Code: " + response.statusCode);
......
...@@ -114,7 +114,7 @@ public class EventDetailActivity extends AppCompatActivity { ...@@ -114,7 +114,7 @@ public class EventDetailActivity extends AppCompatActivity {
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 0 && resultCode == RESULT_OK) { if (requestCode == 0 && resultCode == RESULT_OK) {
// If we are returning from the login activity and have had a successfuly login, refresh the user info and login UI