2013-09-30 14:39:15 -04:00
|
|
|
package com.uncc.gameday.activities;
|
|
|
|
|
2013-10-04 20:22:54 -04:00
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.CheckBox;
|
2013-10-04 20:37:33 -04:00
|
|
|
import android.widget.Toast;
|
2013-09-30 14:23:13 -04:00
|
|
|
|
2013-10-07 14:20:20 -04:00
|
|
|
import com.uncc.gameday.R;
|
|
|
|
|
2013-11-20 11:55:39 -05:00
|
|
|
// TODO: Auto-generated Javadoc
|
|
|
|
/**
|
|
|
|
* The Class Alerts.
|
|
|
|
*/
|
2013-10-03 18:35:39 -04:00
|
|
|
public class Alerts extends MenuActivity {
|
2013-10-04 20:37:33 -04:00
|
|
|
|
2013-11-20 11:55:39 -05:00
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see com.uncc.gameday.activities.MenuActivity#onCreate(android.os.Bundle)
|
|
|
|
*/
|
2013-10-04 20:22:54 -04:00
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
setContentView(R.layout.activity_alerts);
|
|
|
|
}
|
|
|
|
|
2013-11-20 11:55:39 -05:00
|
|
|
/**
|
|
|
|
* On click timed alerts.
|
|
|
|
*
|
|
|
|
* @param view the view
|
|
|
|
*/
|
2013-10-04 20:22:54 -04:00
|
|
|
public void onClickTimedAlerts(View view) {
|
2013-10-04 20:37:33 -04:00
|
|
|
int toastDuration = Toast.LENGTH_SHORT;
|
2013-10-04 20:22:54 -04:00
|
|
|
if (((CheckBox) view).isChecked())
|
|
|
|
// Enable Timed alerts
|
2013-10-16 11:02:18 -04:00
|
|
|
Toast.makeText(this, "Timed alerts enabled.", toastDuration).show();
|
2013-10-04 20:22:54 -04:00
|
|
|
else
|
|
|
|
// Disable Timed alerts
|
2013-10-16 11:02:18 -04:00
|
|
|
Toast.makeText(this, "Timed alerts disabled.", toastDuration).show();
|
2013-10-04 20:22:54 -04:00
|
|
|
}
|
|
|
|
|
2013-11-20 11:55:39 -05:00
|
|
|
/**
|
|
|
|
* On click organization alerts.
|
|
|
|
*
|
|
|
|
* @param view the view
|
|
|
|
*/
|
2013-10-04 20:22:54 -04:00
|
|
|
public void onClickOrganizationAlerts(View view) {
|
2013-10-04 20:37:33 -04:00
|
|
|
int toastDuration = Toast.LENGTH_SHORT;
|
2013-10-04 20:22:54 -04:00
|
|
|
if (((CheckBox) view).isChecked())
|
|
|
|
// Enable Organization alerts
|
2013-10-16 11:02:18 -04:00
|
|
|
Toast.makeText(this, "Organization alerts enabled.", toastDuration).show();
|
2013-10-04 20:22:54 -04:00
|
|
|
else
|
|
|
|
// Disable Organization alerts
|
2013-10-16 11:02:18 -04:00
|
|
|
Toast.makeText(this, "Organization alerts disabled.", toastDuration).show();
|
2013-10-04 20:22:54 -04:00
|
|
|
}
|
|
|
|
|
2013-11-20 11:55:39 -05:00
|
|
|
/**
|
|
|
|
* On click university alerts.
|
|
|
|
*
|
|
|
|
* @param view the view
|
|
|
|
*/
|
2013-10-04 20:22:54 -04:00
|
|
|
public void onClickUniversityAlerts(View view) {
|
2013-10-04 20:37:33 -04:00
|
|
|
int toastDuration = Toast.LENGTH_SHORT;
|
2013-10-04 20:22:54 -04:00
|
|
|
if (((CheckBox) view).isChecked())
|
|
|
|
// Enable University alerts
|
2013-10-16 11:02:18 -04:00
|
|
|
Toast.makeText(this, "University alerts enabled.", toastDuration).show();
|
2013-10-04 20:22:54 -04:00
|
|
|
else
|
|
|
|
// Disable University alerts
|
2013-10-16 11:02:18 -04:00
|
|
|
Toast.makeText(this, "University alerts disabled.", toastDuration).show();
|
2013-10-04 20:22:54 -04:00
|
|
|
}
|
2013-09-30 14:23:13 -04:00
|
|
|
}
|