mirror of
https://github.com/bspeice/UNCCGameDay
synced 2024-11-05 07:38:13 -05:00
Add some documentation for the activities and app context
This commit is contained in:
parent
c843d7f337
commit
d9ce6e0f1c
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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) {
|
||||
|
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user