From d1467881f84679c8ef797d0c19ea9e0eb676b39f Mon Sep 17 00:00:00 2001 From: bspeice Date: Fri, 4 Oct 2013 20:22:54 -0400 Subject: [PATCH] Add generic menus, and implement a basic layout for alert settings. I should commit more often, sorry... --- res/drawable-hdpi/ic_action_directions.png | Bin 0 -> 480 bytes res/drawable-hdpi/ic_action_settings.png | Bin 0 -> 456 bytes res/drawable-hdpi/ic_action_view_as_list.png | Bin 0 -> 308 bytes res/drawable-mdpi/ic_action_directions.png | Bin 0 -> 379 bytes res/drawable-mdpi/ic_action_settings.png | Bin 0 -> 330 bytes res/drawable-mdpi/ic_action_view_as_list.png | Bin 0 -> 247 bytes res/drawable-xhdpi/ic_action_directions.png | Bin 0 -> 606 bytes res/drawable-xhdpi/ic_action_settings.png | Bin 0 -> 471 bytes res/drawable-xhdpi/ic_action_view_as_list.png | Bin 0 -> 341 bytes res/drawable-xxhdpi/ic_action_directions.png | Bin 0 -> 821 bytes res/drawable-xxhdpi/ic_action_settings.png | Bin 0 -> 671 bytes .../ic_action_view_as_list.png | Bin 0 -> 441 bytes res/layout/activity_alerts.xml | 40 ++++++++++++----- res/menu/alerts.xml | 9 ---- res/menu/base.xml | 12 +++++ res/menu/home.xml | 10 ----- res/menu/parking.xml | 9 ---- res/menu/registration.xml | 9 ---- res/values/strings.xml | 4 ++ src/com/uncc/gameday/activities/Alerts.java | 37 +++++++++++++++ src/com/uncc/gameday/activities/Home.java | 1 + .../uncc/gameday/activities/MenuActivity.java | 42 ++++++++++++++++++ 22 files changed, 125 insertions(+), 48 deletions(-) create mode 100644 res/drawable-hdpi/ic_action_directions.png create mode 100644 res/drawable-hdpi/ic_action_settings.png create mode 100644 res/drawable-hdpi/ic_action_view_as_list.png create mode 100644 res/drawable-mdpi/ic_action_directions.png create mode 100644 res/drawable-mdpi/ic_action_settings.png create mode 100644 res/drawable-mdpi/ic_action_view_as_list.png create mode 100644 res/drawable-xhdpi/ic_action_directions.png create mode 100644 res/drawable-xhdpi/ic_action_settings.png create mode 100644 res/drawable-xhdpi/ic_action_view_as_list.png create mode 100644 res/drawable-xxhdpi/ic_action_directions.png create mode 100644 res/drawable-xxhdpi/ic_action_settings.png create mode 100644 res/drawable-xxhdpi/ic_action_view_as_list.png delete mode 100644 res/menu/alerts.xml create mode 100644 res/menu/base.xml delete mode 100644 res/menu/home.xml delete mode 100644 res/menu/parking.xml delete mode 100644 res/menu/registration.xml create mode 100644 src/com/uncc/gameday/activities/MenuActivity.java diff --git a/res/drawable-hdpi/ic_action_directions.png b/res/drawable-hdpi/ic_action_directions.png new file mode 100644 index 0000000000000000000000000000000000000000..cda52741fea4b1c52ff7bae06de875d231c198a2 GIT binary patch literal 480 zcmV<60U!Q}P)YeMA}l95qH=mSwqan&#`@3$);OQIn7i@TwA$ z30_S?GQz7!NM?Atg!BMUm5`p`X%dnVev2BhB_!jOU!j%`7Insw80NffFiyNTh=C_O}seJcrhse{}>4G_IjZS_=ZZAxDLDx z`Atlepu$H#2b3kE;iClxMcol(`#D$;vpS3>jS}Yce#d6g77GMDW WBIdMI9W{{v0000a5SfF0bH`Qe$Hdx00rH9DU)Q4$42YD4Za_=1V4boOZ*5NoYn&+b zh^P{G`2Iu508hSl@PkzfpApU5K#;{PAs^f50fzm=EdooV`MV}Y0~V!)60so?m868d$)g(+g${LLt z@Jw#PQFCtM|2!93EX-vtcn12WQfTsvh=ry=a+wui=*sEOhnf#LsTtthO?+gpa(;@t ykR#Dh4D=iwA{~yh#zH2t`6nL=g$i6x0R{jqFn}~Rb6XPt0000~)nX!?#*+9Tmagk!~tqWC*;WrgCH#@N<@bMpz zN#xacILouLI8MRn(@zoa_nzvrns@jAt?gLH%+SE}>yFF&zma<3i}!t#c&x5oXz}5~ zl|MNu3LZI@oy)In7hn~mwc=}sJkW;>p00i_>zopr E0I)@K`Tzg` literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_action_directions.png b/res/drawable-mdpi/ic_action_directions.png new file mode 100644 index 0000000000000000000000000000000000000000..2b86f58c2df9092222c4cb56ded99a9fd75f1552 GIT binary patch literal 379 zcmV->0fhdEP)F6XV59>^ay1$o8*>4v zcqn(_*|TTAkz)=s1(p{9u{sb-0I{}|l+>B$&!7LMxdV_amqilhC)W|oRIr>PM=(># zay)7ZB+Pk}M~=HYDH(k}W5zJ%GazWLZvjiwMmTpUAa*6pVsV00IC3 Z1^`|%m9Hm1v-`6pHRCwBAU>F4h3>c|tn6a_3Fp#o> za*v%od-g3MJuFoAPz?}sLD^0~Tu4X*6O|pnh0F$qh%CJwfDSlGiUO#M!^p7-7~j1( z(nT?v&?=zX$MgyTy61wKXhOX}-`*O?H1M4&*^q?%{S7H6d_#_FO3MLa^LGofLy0k% zg$UovqUUcsIRO+hn@NcyCTiqmN&qqCz-Anw5=N$-L#!MC`c@4{6{E#}1B}lL?PH13Mw)0F*ew>sQQS|N2&A6B%9hNVv zE?Tk7V6)<4yThpCvg$SKvB$bWJZ#J41HOm`pJqJj!0cWovWDr=ag|xR+(#0x6g8*{ zNKbgd;Fs0b@W#RYV4*^t_oADJE=-V?>%363K$hVY8bg=d#Wzp$Pzys#XL5 literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_directions.png b/res/drawable-xhdpi/ic_action_directions.png new file mode 100644 index 0000000000000000000000000000000000000000..5099d18ba2996e0a8fa0c2f267dff346a3cf75fe GIT binary patch literal 606 zcmV-k0-^nhP)yBPhZTpzT2GLOUvo;(0QeeEfR> zHTZ7r?QJay!2rCfgkS_-O+qjPuOcBBgBO<&48n^_2u9(>Bm~3oA`*gecycYFc2LC!z>!h4@`l@ zf<^Ob=-JI;LG1&;qG!Q!ODZs|YjbOF*Y}cU30+w4t=HRoxhw+!004kwF_XNwq9`_W z+0)3)Pj4F6rfHt)383J&bUFW-z7Pp_j_1q;Z-A5MoEif1zB$?kURky2w=d% zauRpjY!`Atbh=lL)#7Nm=5{+RF3!C*7u;%A_Y8mK*wAyJcfEe41NTd z+^Hl-?|Nn+1weov0zTRac=ydw?!Q7*ftdQe?2*HzI6q(v{T{*);oJc>{q9VF3G_K; zp3Rxw{@SMBwO4^9${+|x)DLj^7LVaCgzy7g#7GQ(0e*laKOly`Ajc1o=r5oQf`9;d z_EQ3N5@2%Mrr%qM1aPWBcKtrN{s7Jehw2Ytb%dDpJG;LywJL!AfC0J!-vJ;XwjaO^ z^ar3nK(`+-2GAdXDgXk~Bmn&Z+6gE<=i>PR+z4Ta00000K*IP6FaWeZqJ|~I6{!FK N002ovPDHLkV1k6H$pZiY literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_view_as_list.png b/res/drawable-xhdpi/ic_action_view_as_list.png new file mode 100644 index 0000000000000000000000000000000000000000..a38638e4dc7a6027a738fa2c9f17ba4dd68af030 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XzI(bjhE&{oGxH$tVFdve&nJ8yyh|A3maqloR&~UiIPm)M zTY8%aH2Jm9nCMrRINS7iRqk`3K86Hey}iuIJ)V5#%AYN~G^@`ac-!A?x1>psaaG84 zhU-_O85ji^7_X&CSFH2b=B?2VW_t7JsDAIw)7B?~`DTh4Y-8GFGt*`^!wv?f4eUL| zj4QWas-5qsGqajsKzfarS;h7pOirKEd7C^Ld1~bogk2a82_$xiU5I1!oaYme!&uDp zW1@K*w*o_Ahk;47#HZD}9i+DE++-1KFmRDj;_h6Nh^MQc%Q~loCIGL+aiahL literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_directions.png b/res/drawable-xxhdpi/ic_action_directions.png new file mode 100644 index 0000000000000000000000000000000000000000..2095fcd5f40ef4a21730886cb72e9401eb6bf270 GIT binary patch literal 821 zcmV-51Iqk~P)0^5yYW>1@8DHD7mV6cPLN|~1{PTC6V%C}Ng7!sNCQe~h0@UQ?Eh4|_SYMNW6y?L6 zojI=otHg($T2sz4&iA?GU&Yso6(HVOoS{Te@drA>Tz``B*Jghv$a)uq5<$g3j~CiQ zWcfv&0{|kFnD2`{4HtP5Mw^aMi1KRFhvV zfT0Lgi86Yu&%On2}&DMs7B_CnwhyHjxq_1Ri zA-`z=fC$ayHxJM-0)%{s01YC*$cG6~F#?o)r~nlrz{!UTP%r|de8>O=BEZUr4UjPc zw0!6Q86v>ThY#={5lqN85#SyX%*ZzrAR&S&`KAKgA%Z#i<^tRj!K8eX0j@;|-<%sh zu=!y1tBVOCgb+dqA%qY@2qAL> literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_settings.png b/res/drawable-xxhdpi/ic_action_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..a9c6b53ca0d503b672a4fb04c28c0f19f452a70a GIT binary patch literal 671 zcmV;Q0$}}#P)c|_0(vsmly!|X0t{&pPzVS>00O{}`iL%k z(nyEO%e}mu^Of=?s-cZq`Q}~lA2RuH%{{%3_Iwwz^_EW+L>qtrFrO%F+>2bjW6vQGO2d1sMi{#H`&x`5EUA`IVrQ^N~z*LtVoh_9}hxvl&hyel+00eE%||L?6{T)fq^4=k<;TlC zMZ0CJUSb{_3%UJPQ7q&ZQA9FJ83F(R00000l*N|-0{~&FyY;0xny>%>002ovPDHLk FV1hGA9ZmoM literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_view_as_list.png b/res/drawable-xxhdpi/ic_action_view_as_list.png new file mode 100644 index 0000000000000000000000000000000000000000..b00a85f6df2caf176b83330b7a073b3d823a1249 GIT binary patch literal 441 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGok|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+7^6L1978H@y}51Zci2FL?Lot?1G7Z06)^Z0uvzdvf4~sa zxYd?xG2GSHvFwX?OC~w6OR6@j2m=Ao~~?G~TT`;u`FgT+=i6YSuZ+ z^UwFaSazYmw(H}aNQT`Kw~OPyL<#TEVdQXNfTDz2v#I;vs~=nVaaM?}+e+C3iqHRC zEBYGjrSE(+Sw#1Q@d4un%QTn$*u7~sBa;II5Uq}8tv&uDV~^VM|C{Bjc^{aU9r}H& z{1AWC1hJ4azIPIXADc>6^F6RTw)%G*w-5u900UFRU89os`kuxP+=u*b_(|w`fNW<< z2t9ov_D#!nU2&CZCzprbN@2@z{Bomd+5W?N)(^c|12*r^as;{ZfYyuqLUF-+y9;k; zGk90{UiG_S+_0|vP+YJnGfM*l2q`eA3N$bX9LSn#)%Bz2 + + android:text="@string/alerts_label_alerts_to_receive" + android:textAppearance="?android:attr/textAppearanceMedium" /> - + + + + + + + \ No newline at end of file diff --git a/res/menu/alerts.xml b/res/menu/alerts.xml deleted file mode 100644 index bcabd05..0000000 --- a/res/menu/alerts.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/res/menu/base.xml b/res/menu/base.xml new file mode 100644 index 0000000..d5dfc3c --- /dev/null +++ b/res/menu/base.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/res/menu/home.xml b/res/menu/home.xml deleted file mode 100644 index 180d9e6..0000000 --- a/res/menu/home.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/res/menu/parking.xml b/res/menu/parking.xml deleted file mode 100644 index 1db892a..0000000 --- a/res/menu/parking.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/res/menu/registration.xml b/res/menu/registration.xml deleted file mode 100644 index 1db892a..0000000 --- a/res/menu/registration.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/res/values/strings.xml b/res/values/strings.xml index d3312a8..7ed3a92 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -7,5 +7,9 @@ Parking Registration Alerts + Select Alerts to Receive: + Timed (Reserve Ticket...) + Organizations + University diff --git a/src/com/uncc/gameday/activities/Alerts.java b/src/com/uncc/gameday/activities/Alerts.java index 042ac62..dd0fa3f 100644 --- a/src/com/uncc/gameday/activities/Alerts.java +++ b/src/com/uncc/gameday/activities/Alerts.java @@ -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 + ; + } + } } diff --git a/src/com/uncc/gameday/activities/Home.java b/src/com/uncc/gameday/activities/Home.java index d939aad..54c11a4 100644 --- a/src/com/uncc/gameday/activities/Home.java +++ b/src/com/uncc/gameday/activities/Home.java @@ -1,6 +1,7 @@ package com.uncc.gameday.activities; + public class Home extends MenuActivity { } diff --git a/src/com/uncc/gameday/activities/MenuActivity.java b/src/com/uncc/gameday/activities/MenuActivity.java new file mode 100644 index 0000000..21273aa --- /dev/null +++ b/src/com/uncc/gameday/activities/MenuActivity.java @@ -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; + } + +}