mirror of
https://github.com/bspeice/UNCCGameDay
synced 2024-11-04 23:28:12 -05:00
Move to a generic Menu activity from which actual App-level
functionality will be built. This way, we can program the menus once for all.
This commit is contained in:
parent
82804a9d67
commit
412f894d92
@ -1,35 +1,6 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
import com.uncc.gameday.R;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
public class Alerts extends MenuActivity {
|
||||
|
||||
public class Alerts extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_alerts);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.alerts, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()){
|
||||
case R.id.action_alert_settings:
|
||||
startActivity(new Intent(this, Alerts.class));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1,37 +1,6 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
import com.uncc.gameday.R;
|
||||
import com.uncc.gameday.R.layout;
|
||||
import com.uncc.gameday.R.menu;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
public class Home 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.home, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()){
|
||||
case R.id.action_alert_settings:
|
||||
startActivity(new Intent(this, Alerts.class));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public class Home extends MenuActivity {
|
||||
|
||||
}
|
||||
|
@ -1,24 +1,6 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
import com.uncc.gameday.R;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.view.Menu;
|
||||
|
||||
public class Parking extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_parking);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.parking, menu);
|
||||
return true;
|
||||
}
|
||||
public class Parking extends MenuActivity {
|
||||
|
||||
}
|
||||
|
@ -1,26 +1,6 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
import com.uncc.gameday.R;
|
||||
import com.uncc.gameday.R.layout;
|
||||
import com.uncc.gameday.R.menu;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.view.Menu;
|
||||
|
||||
public class Registration extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_registration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.registration, menu);
|
||||
return true;
|
||||
}
|
||||
public class Registration extends MenuActivity {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user