From adc9fc0580c6e6d552aa6f7ebc22f0ea729c5ddd Mon Sep 17 00:00:00 2001 From: bspeice Date: Tue, 1 Oct 2013 20:17:21 -0400 Subject: [PATCH] Add an initial menu, and allow user to visit alerts page --- AndroidManifest.xml | 4 ++-- bin/AndroidManifest.xml | 4 ++-- res/drawable-hdpi/ic_action_warning.png | Bin 0 -> 532 bytes res/drawable-mdpi/ic_action_warning.png | Bin 0 -> 426 bytes res/drawable-xhdpi/ic_action_warning.png | Bin 0 -> 705 bytes res/drawable-xxhdpi/ic_action_warning.png | Bin 0 -> 912 bytes res/menu/home.xml | 7 ++++--- res/values/strings.xml | 2 +- src/com/uncc/gameday/activities/Alerts.java | 10 ++++++++++ src/com/uncc/gameday/activities/Home.java | 11 +++++++++++ 10 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 res/drawable-hdpi/ic_action_warning.png create mode 100644 res/drawable-mdpi/ic_action_warning.png create mode 100644 res/drawable-xhdpi/ic_action_warning.png create mode 100644 res/drawable-xxhdpi/ic_action_warning.png diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 0059431..b1db562 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -15,7 +15,7 @@ android:theme="@style/AppTheme" > + android:label="@string/title_activity_alerts" > + android:label="@string/app_name" > diff --git a/bin/AndroidManifest.xml b/bin/AndroidManifest.xml index 0059431..b1db562 100644 --- a/bin/AndroidManifest.xml +++ b/bin/AndroidManifest.xml @@ -15,7 +15,7 @@ android:theme="@style/AppTheme" > + android:label="@string/title_activity_alerts" > + android:label="@string/app_name" > diff --git a/res/drawable-hdpi/ic_action_warning.png b/res/drawable-hdpi/ic_action_warning.png new file mode 100644 index 0000000000000000000000000000000000000000..45bf4f0da722be2e5aac0a508e255cc0b606de86 GIT binary patch literal 532 zcmV+v0_**WP)ahrl0*sTX^3TuPN>@xd_G*4O~t(RrqeBRDFiUb0I zKp?P$qA0Rq*!;$WMdNFDv@kYln#O(KpKN?5v1I%b9@X7cg>(Od0H7hxg+~B$J|Foh zw^0v?Bkx;_Lc;9*H9S@mOIElhJOW_Yg6QD}*9I4XL3JpGEfj_FPXHyd)Oe-jlGR5h zN3k;P;hq3W;g%tS z+c~m2Cjt#oHYu{&I3)lc8%|r!6LpPyI*Wjf&a!br06dkC$tD9b+}j=jjef^C3c3ZY zdyth>*#tv&CbEj(II!P|v3Gfe@uXqQ{h;Cn?$BRwhrV#9P|YNp6j>!7Zm~wcqm>fS zn$qFdS^!I{@fo10bb_B%}rvqgx1s5h+G}2LOHQ3#70mJYlFD z?HmA2@lJS@IFXtwNDTpy54oW1w?MoFir+%TxS(pN?*O3BK#9&0N$Bm_vu8JhFp>j6 zz!IvK>LK7u3$;u{`rZ;P+Yth4P(7480B8^wnOQ6hs+Zyra7IdaqyR3cUc7*rh-{aM zL;9PPl++6#2B`s+g8bN`0w{m{`Sa)BaoNE_Mu`UlpbDs%$Wn7U$x#5!O8Cn6Z$Nwt ziofAeXMitTGLh+f5O@MC1A0Li#3nZ+nQ-{t85+dY0;4y#N3J07*qoM6N<$f?Teqp8x;= literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_warning.png b/res/drawable-xhdpi/ic_action_warning.png new file mode 100644 index 0000000000000000000000000000000000000000..f1a5498fe54175ce2aaea05bbcabd36e14665b07 GIT binary patch literal 705 zcmV;y0zUnTP)iyIn4q?l*ID9db$TcK7z@ zQpXVlK@bE%5QKk8$JC2`-}j&kpzWZomdoYN#5}GH3jYDx0RK**%}h+9Ye@SO=*CAs z-SqqY{bsZIy!2dLL#7|)T#E2oy9EFw(DD}Q;kEV(05m*6$5%vvV_Itg3DFq)1OS>H zK{u>0bckbHX8{S**ye{p&}a-@9j$s07CR6Y*VbDAEWQU_sBmkD_gcRN;)1YOY6W<& zy#fFY4okvb838`S+FGDUgIVssKl$zYs5Ur##@xDU5Hy!*ep+yO4%Oc}$66i>#xG#} zhc#OOb9&1C8*|kOTs|PH_9#7g51-k50buBg80H#rghdVu;LPHZMhgHP8D}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n?0 z%j(-pT*5-#f&R>@l?q{)@ll}nlFO%n2~~+7cIG}$|68~|p7C$-s-ojZx0Sri$$0f@ zo8gA-r*bl-Cy0EBop1)cs zmvwsTG>9LWt){k-L2eIw+r9Vfa+B_L{G7ePIrQ6?;*1aSn%6lNv>f`+4@|NRK&$}7 j96-#3%sqA8o{^2A-m8T*w)%Y|P?o{d)z4*}Q$iB}Pll7` literal 0 HcmV?d00001 diff --git a/res/menu/home.xml b/res/menu/home.xml index 1db892a..180d9e6 100644 --- a/res/menu/home.xml +++ b/res/menu/home.xml @@ -1,9 +1,10 @@ + android:showAsAction="ifRoom" + android:title="@string/action_alert_settings" + android:icon="@drawable/ic_action_warning"/> diff --git a/res/values/strings.xml b/res/values/strings.xml index 4b04490..d3312a8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -6,6 +6,6 @@ Welcome to UNCC GameDay! Parking Registration - Home + Alerts diff --git a/src/com/uncc/gameday/activities/Alerts.java b/src/com/uncc/gameday/activities/Alerts.java index de5ea7f..3bf3e6e 100644 --- a/src/com/uncc/gameday/activities/Alerts.java +++ b/src/com/uncc/gameday/activities/Alerts.java @@ -4,7 +4,9 @@ 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 Activity { @@ -22,4 +24,12 @@ public class Alerts extends Activity { 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; + } } diff --git a/src/com/uncc/gameday/activities/Home.java b/src/com/uncc/gameday/activities/Home.java index 259af87..8f63f28 100644 --- a/src/com/uncc/gameday/activities/Home.java +++ b/src/com/uncc/gameday/activities/Home.java @@ -6,7 +6,9 @@ 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 { @@ -22,5 +24,14 @@ public class Home extends Activity { 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; + } }