Add an initial menu, and allow user to visit alerts page

This commit is contained in:
bspeice 2013-10-01 20:17:21 -04:00
parent 89b73f5906
commit adc9fc0580
10 changed files with 30 additions and 8 deletions

View File

@ -15,7 +15,7 @@
android:theme="@style/AppTheme" > android:theme="@style/AppTheme" >
<activity <activity
android:name="com.uncc.gameday.activities.Alerts" android:name="com.uncc.gameday.activities.Alerts"
android:label="@string/app_name" > android:label="@string/title_activity_alerts" >
</activity> </activity>
<activity <activity
android:name="com.uncc.gameday.activities.Parking" android:name="com.uncc.gameday.activities.Parking"
@ -27,7 +27,7 @@
</activity> </activity>
<activity <activity
android:name="com.uncc.gameday.activities.Home" android:name="com.uncc.gameday.activities.Home"
android:label="@string/title_activity_home" > android:label="@string/app_name" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@ -15,7 +15,7 @@
android:theme="@style/AppTheme" > android:theme="@style/AppTheme" >
<activity <activity
android:name="com.uncc.gameday.activities.Alerts" android:name="com.uncc.gameday.activities.Alerts"
android:label="@string/app_name" > android:label="@string/title_activity_alerts" >
</activity> </activity>
<activity <activity
android:name="com.uncc.gameday.activities.Parking" android:name="com.uncc.gameday.activities.Parking"
@ -27,7 +27,7 @@
</activity> </activity>
<activity <activity
android:name="com.uncc.gameday.activities.Home" android:name="com.uncc.gameday.activities.Home"
android:label="@string/title_activity_home" > android:label="@string/app_name" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

View File

@ -1,9 +1,10 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" > <menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item <item
android:id="@+id/action_settings" android:id="@+id/action_alert_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" android:showAsAction="ifRoom"
android:title="@string/action_alert_settings"/> android:title="@string/action_alert_settings"
android:icon="@drawable/ic_action_warning"/>
</menu> </menu>

View File

@ -6,6 +6,6 @@
<string name="hello_world">Welcome to UNCC GameDay!</string> <string name="hello_world">Welcome to UNCC GameDay!</string>
<string name="title_activity_parking">Parking</string> <string name="title_activity_parking">Parking</string>
<string name="title_activity_registration">Registration</string> <string name="title_activity_registration">Registration</string>
<string name="title_activity_home">Home</string> <string name="title_activity_alerts">Alerts</string>
</resources> </resources>

View File

@ -4,7 +4,9 @@ import com.uncc.gameday.R;
import android.os.Bundle; import android.os.Bundle;
import android.app.Activity; import android.app.Activity;
import android.content.Intent;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem;
public class Alerts extends Activity { public class Alerts extends Activity {
@ -22,4 +24,12 @@ public class Alerts extends Activity {
return true; 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;
}
} }

View File

@ -6,7 +6,9 @@ import com.uncc.gameday.R.menu;
import android.os.Bundle; import android.os.Bundle;
import android.app.Activity; import android.app.Activity;
import android.content.Intent;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem;
public class Home extends Activity { public class Home extends Activity {
@ -23,4 +25,13 @@ public class Home extends Activity {
return true; 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;
}
} }