* The activity/screen used for showing a selected event in detail.
* This mainly displays stored info about the event, eg description and also fetches more such as images. Also handles registering for and event and the possible outcomes
*
* To launch this activity, you need to provide an event to view. You need to provide this as an intent extra (use intent.putExtra()):
* - Provide eventGroup == -1, eventGroup == index in Events.eventInfos (unsorted list)
* - Provide eventGroup == group in Events.sortedEventInfos, eventGroup == index in Events.sortedEventInfos (sorted list)
* - Provide eventId == any valid event id
*
* If the event is not found, the activity finishes and returns to the calling activity.
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. Returning to calling activity...");
Log.e("events","No event found from eventId="+intent.getStringExtra(LauncherExtras.EVENT_ID)+" in intent, have you used intent.putStringExtra. Returning to calling activity...");
}
if(event==null)
ReturnToCallingActivity(false);
}
/**
...
...
@@ -169,11 +196,7 @@ public class EventDetailActivity extends AppCompatActivity {
Util.SetupToolbar(this,true);
//Check that we have been given an event that exists else return to the calling activity
if(!hasEvent()){
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;
}
if(event==null)return;
//Link up variables with UI elements from the layout xml
scrollView=findViewById(R.id.scrollView);
...
...
@@ -230,16 +253,16 @@ public class EventDetailActivity extends AppCompatActivity {
@@ -253,7 +276,7 @@ public class EventDetailActivity extends AppCompatActivity {
privatevoidLoadEventImage(booleanisRefreshing)
{
//Image loading and masking. the posterMask is a small arrow image but we use the layout margin to add some transparent 'padding' to the top of the scrollview