mirror of
https://github.com/bspeice/UNCCGameDay
synced 2025-07-03 14:55:14 -04:00
Add generic menus, and implement a basic layout for alert settings.
I should commit more often, sorry...
This commit is contained in:
@ -1,6 +1,43 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
import com.uncc.gameday.R;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
|
||||
public class Alerts extends MenuActivity {
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_alerts);
|
||||
}
|
||||
|
||||
public void onClickTimedAlerts(View view) {
|
||||
if (((CheckBox) view).isChecked())
|
||||
// Enable Timed alerts
|
||||
;
|
||||
else
|
||||
// Disable Timed alerts
|
||||
;
|
||||
}
|
||||
|
||||
public void onClickOrganizationAlerts(View view) {
|
||||
if (((CheckBox) view).isChecked())
|
||||
// Enable Organization alerts
|
||||
;
|
||||
else
|
||||
// Disable Organization alerts
|
||||
;
|
||||
}
|
||||
|
||||
public void onClickUniversityAlerts(View view) {
|
||||
if (((CheckBox) view).isChecked())
|
||||
// Enable University alerts
|
||||
;
|
||||
else
|
||||
// Disable University alerts
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
|
||||
|
||||
public class Home extends MenuActivity {
|
||||
|
||||
}
|
||||
|
42
src/com/uncc/gameday/activities/MenuActivity.java
Normal file
42
src/com/uncc/gameday/activities/MenuActivity.java
Normal file
@ -0,0 +1,42 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import com.uncc.gameday.R;
|
||||
|
||||
public class MenuActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_home);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.base, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()){
|
||||
case R.id.action_alert_settings:
|
||||
startActivity(new Intent(this, Alerts.class));
|
||||
break;
|
||||
case R.id.action_registration:
|
||||
startActivity(new Intent(this, Registration.class));
|
||||
break;
|
||||
case R.id.action_parking:
|
||||
startActivity(new Intent(this, Parking.class));
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user