* 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
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
mRecyclerView.setAdapter(mRecyclerAdapter);
AnimateList(null);
}
...
...
@@ -133,17 +133,17 @@ public class SearchMembersActivity extends AppCompatActivity {
@@ -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
,newResponse.Listener<String>(){@OverridepublicvoidonResponse(Stringresponse){}}//initalise with empty response listeners as we will handle the response in the parseNetworkResponse and parseNetworkError functions
,newResponse.Listener<String>(){@OverridepublicvoidonResponse(Stringresponse){}}//initialise with empty response listeners as we will handle the response in the parseNetworkResponse and parseNetworkError functions
// 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 {
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
* @param callback Use this callback for executing code when the data has been received
@@ -133,7 +133,7 @@ public class LoginActivity extends AppCompatActivity {
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
* 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
@@ -68,7 +68,7 @@ public class MainActivity extends AppCompatActivity {
//====Handling of the response of the request
@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) {
Log.e("request", "fetch demo data status Code: " + response.statusCode);
@@ -173,7 +173,7 @@ public class EventDetailActivity extends AppCompatActivity {
//Check that we have been given an event that exists else return to the calling activity
if(!hasEvent()){
Log.e("events","invlaid event index selected during InitUI(), (groupIndex, eventIndex): ("+eventGroup+","+eventIndex+"), total event size"+Events.eventInfos.size()+". Ensure that you are not clearing/overwiting the events list while viewing an event.");
Log.e("events","invalid event index selected during InitUI(), (groupIndex, eventIndex): ("+eventGroup+","+eventIndex+"), total event size"+Events.eventInfos.size()+". Ensure that you are not clearing/overwriting the events list while viewing an event.");
onBackPressed();
return;
}
...
...
@@ -194,7 +194,7 @@ public class EventDetailActivity extends AppCompatActivity {
//Setup swipe down to refresh, adds the amiv logo and rotate animation
@@ -125,7 +125,7 @@ public class EventsListAdapter extends BaseRecyclerAdapter {
* This is where the data in the ui is set. Note that position is the position on screen whereas getAdapterPos is the position in the whole list
*/
@Override
publicvoidonBindViewHolder(RecyclerView.ViewHolderholder,intscreenPosition){//NOTE: screenPosition supplied is position on screen not in the list!, use holder.getAdapterPosition() indstead
publicvoidonBindViewHolder(RecyclerView.ViewHolderholder,intscreenPosition){//NOTE: screenPosition supplied is position on screen not in the list!, use holder.getAdapterPosition() instead
@@ -91,7 +91,7 @@ public class JobDetailActivity extends AppCompatActivity {
//Check that we have been given a job that exists else return to the calling activity
if(!hasJob()){
Log.e("jobs","invlaid job index selected during InitUI(), (groupIndex, jobIndex): ("+jobGroup+","+jobIndex+"), total job size"+Jobs.jobInfos.size()+". Ensure that you are not clearing/overwiting the jobs list while viewing a job.");
Log.e("jobs","invalid job index selected during InitUI(), (groupIndex, jobIndex): ("+jobGroup+","+jobIndex+"), total job size"+Jobs.jobInfos.size()+". Ensure that you are not clearing/overwriting the jobs list while viewing a job.");
onBackPressed();
return;
}
...
...
@@ -139,7 +139,6 @@ public class JobDetailActivity extends AppCompatActivity {
/**
* Will start the pdf download as a notification to the downloads folder