diff --git a/src/com/uncc/gameday/GameDay.java b/src/com/uncc/gameday/GameDay.java index a120b69..5fcc139 100644 --- a/src/com/uncc/gameday/GameDay.java +++ b/src/com/uncc/gameday/GameDay.java @@ -21,7 +21,8 @@ public class GameDay extends Application{ } /** - * Gets the app context. + * Provides a static way of getting to the Application-level context. + * Unless you know *exactly* why you need this, you don't. * * @return the app context */ diff --git a/src/com/uncc/gameday/activities/Alerts.java b/src/com/uncc/gameday/activities/Alerts.java index dce0842..af29756 100644 --- a/src/com/uncc/gameday/activities/Alerts.java +++ b/src/com/uncc/gameday/activities/Alerts.java @@ -22,9 +22,9 @@ public class Alerts extends MenuActivity { } /** - * On click timed alerts. + * On clicking the Timed Alerts box, enable or disable the alerts. * - * @param view the view + * @param view - The view clicked */ public void onClickTimedAlerts(View view) { int toastDuration = Toast.LENGTH_SHORT; @@ -37,7 +37,7 @@ public class Alerts extends MenuActivity { } /** - * On click organization alerts. + * On clicking the Organization Alerts box, enable or disable the alerts. * * @param view the view */ @@ -52,7 +52,7 @@ public class Alerts extends MenuActivity { } /** - * On click university alerts. + * On clicking the University Alerts box, enable or disable the alerts. * * @param view the view */ diff --git a/src/com/uncc/gameday/activities/MenuActivity.java b/src/com/uncc/gameday/activities/MenuActivity.java index 014cbeb..756946e 100644 --- a/src/com/uncc/gameday/activities/MenuActivity.java +++ b/src/com/uncc/gameday/activities/MenuActivity.java @@ -10,7 +10,7 @@ import com.uncc.gameday.R; // TODO: Auto-generated Javadoc /** - * The Class MenuActivity. + * The Class MenuActivity - Provides a re-usable way to define menu behavior */ public class MenuActivity extends Activity { @@ -33,8 +33,11 @@ public class MenuActivity extends Activity { return true; } - /* (non-Javadoc) - * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem) + /** + * When a menu item is selected, fire up its activity. This allows us to + * define a single method for menu items that is re-used by sub-classes. + * + * @param item - The MenuItem selected */ @Override public boolean onOptionsItemSelected(MenuItem item) { diff --git a/src/com/uncc/gameday/activities/Parking.java b/src/com/uncc/gameday/activities/Parking.java index 5569969..6f6cad7 100644 --- a/src/com/uncc/gameday/activities/Parking.java +++ b/src/com/uncc/gameday/activities/Parking.java @@ -25,15 +25,17 @@ public class Parking extends MenuActivity { } /** - * On radio button click. + * On clicking a parking lot button, show that fragment * * @param v the v */ public void onRadioButtonClick(View v) { + // Set up some initial fragment boilerplate FragmentManager fm = this.getFragmentManager(); LotViewFragment f = new LotViewFragment(); Bundle fBundle = new Bundle(); + // Get the actual parking lot we will load (store as a String) switch (v.getId()) { case R.id.radioButtonBlack: fBundle.putCharArray("CHOICE", ParkingChoice.BLACK.getValue().toCharArray()); @@ -70,6 +72,8 @@ public class Parking extends MenuActivity { break; } + // Start up the fragment with the information + // Note the setArguments() and getArguments() function f.setArguments(fBundle); f.show(fm, "lot_view"); }