diff --git a/.gitattributes b/.gitattributes index 412eeda..e48565c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,3 +20,6 @@ *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain + +*.zip filter=lfs -text +*.iso filter=lfs -text diff --git a/COPYRIGHT.docx b/COPYRIGHT.docx index 4830c3a..4b9aad2 100644 Binary files a/COPYRIGHT.docx and b/COPYRIGHT.docx differ diff --git a/FBLA Statement of Assurance 2015 - filled out aak.doc b/FBLA Statement of Assurance 2015 - filled out aak.doc index 337966b..9ba5564 100644 Binary files a/FBLA Statement of Assurance 2015 - filled out aak.doc and b/FBLA Statement of Assurance 2015 - filled out aak.doc differ diff --git a/FBLA2015/app/app-release.apk b/FBLA2015/app/app-release.apk index f0901a7..8250093 100644 Binary files a/FBLA2015/app/app-release.apk and b/FBLA2015/app/app-release.apk differ diff --git a/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/Downloader.java b/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/Downloader.java index 725998f..43338be 100644 --- a/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/Downloader.java +++ b/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/Downloader.java @@ -1,7 +1,18 @@ //Filename: Downloader.java +/** + * This class contains the ASync Task used for downloading updates + * + * Created by Andrew Katz on 5/1/2015. + * Version 2.0 released 5/4/2015. + * + * @author Andrew Katz + * @version 2.0 + */ + package com.aakportfolio.www.fbla2015; //Imports Section + import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; @@ -16,15 +27,7 @@ import java.net.URL; import java.net.URLConnection; -/** - * This class contains the ASync Task used for downloading updates - * - * Created by Andrew Katz on 5/1/2015. - * Version 2.0 released 5/4/2015. - * - * @author Andrew Katz - * @version 2.0 - */ + public class Downloader extends AsyncTask { //This variable holds the main activity, and the context for the progress dialog, etc. private MainActivity mainActivity; @@ -99,7 +102,7 @@ protected Void doInBackground(Void... params) { fail = false; } catch (Exception e) { //If we fail, output debug info (if in debug mode - if(MHSConstants.debug){ + if (MHSConstants.debug) { e.printStackTrace(); } diff --git a/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MainActivity.java b/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MainActivity.java index 79f5a12..f56c919 100644 --- a/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MainActivity.java +++ b/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MainActivity.java @@ -124,14 +124,14 @@ protected void onResume() { //Always call the super class super.onResume(); - //See if the listview was refilled today, and update preformed + //See if the listview was refilled today, and update performed if (!new SimpleDateFormat("MM/dd/yyyy").format(new Date()).equals(lastUpdate)) { //If we didn't update today and refill today //Set update to today lastUpdate = new SimpleDateFormat("MM/dd/yyyy").format(new Date()); - //Lets check if there is internet + //Let's check if there is internet if (isNetworkAvailable()) { //Check if there is internet - //If we have internet, preform an update. + //If we have internet, perform an update. update(); } //Refill to remove old events and add new ones @@ -189,7 +189,7 @@ private void orderAndRemoveEvents() { } } - //Use Timsort to sort our arraylist, using our compareTo method + //Use Collections.sort to sort our ArrayList, using our compareTo method Collections.sort(Events); } @@ -197,7 +197,7 @@ private void orderAndRemoveEvents() { * This method reads lines from the event list, and returns the string * containing all the lines * - * @return Lines from calender file + * @return Lines from calendar file */ private String readLines() { //Try a maximum of three times to read lines from the file. @@ -234,14 +234,14 @@ private String readLines() { /** * This function gets the lines from the file - * and puts them into an arraylist of events. Just an overloaded header for simplicity + * and puts them into an ArrayList of events. Just an overloaded header for simplicity */ private void readFileIntoArrayList() { readFileIntoArrayList(0); } /** - * This function actualy reads the lines of the file into teha arraylist + * This function actually reads the lines of the file into the ArrayList * @param tries try number, to prevent infinite recursion */ private void readFileIntoArrayList(int tries) { @@ -263,7 +263,9 @@ private void readFileIntoArrayList(int tries) { //Split the line and make a new event from it, removing quotes for (int i = 0; i < line.length; i++) { //Remove any quotes now that lines are split, for better readability - line[i] = line[i].replace("\"", ""); + if(line[i].charAt(0) == '"' && line[i].charAt(line[i].length() - 1) == '"'){ + line[i] = line[i].substring(1, line[i].length() - 1); + } } //Add the new event Events.add(new MHSEvent(line)); @@ -437,7 +439,7 @@ public void onClick(DialogInterface dialog, int id) { * This method deals with action bar selections * * @param item selected item - * @return whether action was preformed + * @return whether action was performed */ @Override public boolean onOptionsItemSelected(MenuItem item) { diff --git a/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/eventDummy.java b/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/eventDummy.java index abae5c8..a1d2b42 100644 --- a/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/eventDummy.java +++ b/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/eventDummy.java @@ -19,7 +19,6 @@ import android.content.Intent; import android.os.Bundle; import android.provider.CalendarContract; -import android.support.v4.app.NavUtils; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.view.MenuItem; @@ -191,11 +190,11 @@ private void sendEmail() { try { - //Create a chooser in case multiple email apps are installed + //Start the intent to send email startActivity(emailIntent); } catch (ActivityNotFoundException ex) { //If no email apps are installed, and the chooser crashes, tell user ourselves - Toast.makeText(eventDummy.this, "No email clients stalled.\nYou may manually email " + Toast.makeText(eventDummy.this, "No email clients installed.\nYou may manually email " + "this address: " + myEvent.getContactEmail(), Toast.LENGTH_LONG).show(); } @@ -223,7 +222,7 @@ private void doShare() { } /** - * This method handles the calander + * This method handles the calendar */ private void doCal() { try { diff --git a/FBLA2015/app/src/main/res/raw/cal.csv b/FBLA2015/app/src/main/res/raw/cal.csv index c394261..3cad19b 100644 --- a/FBLA2015/app/src/main/res/raw/cal.csv +++ b/FBLA2015/app/src/main/res/raw/cal.csv @@ -1,6 +1,6 @@ Name,Description,Start Date,Start Time,End Date,End Time,Email,Type Mamaroneck Schools Foundation Spring Benefit,none,5/2/2015,6:30 PM,5/2/2015,none,events-temp@mamkschools.org,none -SAT Test/MHS,The national College Board's SAT test is administered to students who have registered to take it on this day.,5/2/2015,none,5/2/2015,none,events-temp@mamkschools.org,test +SAT Test/MHS,The National College Board's SAT test is administered to students who have registered to take it on this day.,5/2/2015,none,5/2/2015,none,events-temp@mamkschools.org,test MHS AP Chemistry Exam,Advanced Placement exam in Chemistry is administered to registered MHS students,5/4/2015,none,5/4/2015,none,events-temp@mamkschools.org,test MHS AP Calculus AB & BC in am,none,5/5/2015,none,5/5/2015,none,events-temp@mamkschools.org,test MHS Mother's Day Sale/Concourse,Purchase lovely gifts for Mother's Day at affordable prices. ,5/6/2015,none,5/6/2015,none,events-temp@mamkschools.org,none @@ -26,11 +26,11 @@ MHS AP Macroeconomics Exam,Advanced Placement Exam in Macroeconomics is administ MHS AP Microeconomics Exam,Advanced Placement Exam in Microeconomics is administered to registered MHS students,5/15/2015,none,5/15/2015,none,events-temp@mamkschools.org,test PTA Council,The leaders of all PTAs and the MHS PTSA hold a business meeting,5/15/2015,9:15 AM,5/15/2015,none,events-temp@mamkschools.org,none STEM-tastic Saturday/HOM,A STEM celebration for the entire school district and the Larchmont-Mamaroneck community,5/16/2015,none,5/16/2015,none,events-temp@mamkschools.org,none -MHS Original Science Research Symposium/Lib,"Students in the Original Science Research Program at MHS present their research at poster sessions and serval in-depth presentations of certain student projects are highlighted. The event is free and students, parents and community members are invited to attend.",5/18/2015,none,5/18/2015,none,events-temp@mamkschools.org,research +MHS Original Science Research Symposium/Lib,"Students in the Original Science Research Program at MHS present their research at poster sessions and several in-depth presentations of certain student projects are highlighted. The event is free and students, parents and community members are invited to attend.",5/18/2015,none,5/18/2015,none,events-temp@mamkschools.org,research MHS Spring Art Show Opening/Palmer Gallery,6-8 pm (Open schl hours through 5/30),5/19/2015,6:00 PM,5/19/2015,8:00 PM,events-temp@mamkschools.org,art MHS Video Show/PACE Theatre,A student presentation of videos produced as part of the media program at MHS,5/19/2015,7:00 PM,5/19/2015,none,events-temp@mamkschools.org,art MHS Spring Concert/McLain Aud,The MHS student orchestra and chamber orchestra perform selections of classical music. All are welcome to attend. Free,5/20/2015,7:30 PM,5/20/2015,none,events-temp@mamkschools.org,music -Snow Make Up or School Holiday,"School holiday unless there have been 4 school closings, then school is in session",5/22/2015,none,5/22/2015,none,events-temp@mamkschools.org,school +Snow Make-Up or School Holiday,"School holiday unless there have been 4 school closings, then school is in session",5/22/2015,none,5/22/2015,none,events-temp@mamkschools.org,school Memorial Day -- Schools Closed,School Holiday - Memorial Day,5/25/2015,none,5/25/2015,none,events-temp@mamkschools.org,school School Holiday -- Schools Closed,School Holiday - Day after Memorial Day - no school,5/26/2015,none,5/26/2015,none,events-temp@mamkschools.org,school MHS National Honor Society Induction/McLain Aud,Annual ceremony to induct students into the National Honor Society. Parents and students are invited to attend.,5/27/2015,none,5/27/2015,none,events-temp@mamkschools.org,award @@ -38,10 +38,10 @@ MHS Senior Honors Reception,A special reception for MHS seniors who have receive Regents Exam - English Language Arts,Regents exams administered in English Language Arts - 3 hours,6/2/2015,9:15 AM,6/2/2015,12:15 PM,eclain@mamkschools.org,test Regents Exam - Geometry,Regents exams administered in Geometry (Common Core) - 3 hours,6/2/2015,1:15 AM,6/2/2015,4:15 PM,events-temp@mamkschools.org,test Schl Bd Study Session/MHS Lib Clsm,none,6/2/2015,7:30 PM,6/2/2015,none,events-temp@mamkschools.org,none -PACE Performing Arts Festival ,An extraordinary showcase of performances by students who are participants in the PACE program,6/3/2015,none,6/3/2015,none,events-temp@mamkschools.org,pace -PACE Performing Arts Festival ,An extraordinary showcase of performances by students who are participants in the PACE program,6/4/2015,none,6/4/2015,none,events-temp@mamkschools.org,pace -PACE Performing Arts Festival ,An extraordinary showcase of performances by students who are participants in the PACE program,6/5/2015,none,6/5/2015,7:30 PM,events-temp@mamkschools.org,pace -PACE Performing Arts Festival ,An extraordinary showcase of performances by students who are participants in the PACE program,6/6/2015,none,6/6/2015,none,events-temp@mamkschools.org,pace +PACE Performing Arts Festival,An extraordinary showcase of performances by students who are participants in the PACE program,6/3/2015,none,6/3/2015,none,events-temp@mamkschools.org,pace +PACE Performing Arts Festival,An extraordinary showcase of performances by students who are participants in the PACE program,6/4/2015,none,6/4/2015,none,events-temp@mamkschools.org,pace +PACE Performing Arts Festival,An extraordinary showcase of performances by students who are participants in the PACE program,6/5/2015,none,6/5/2015,7:30 PM,events-temp@mamkschools.org,pace +PACE Performing Arts Festival,An extraordinary showcase of performances by students who are participants in the PACE program,6/6/2015,none,6/6/2015,none,events-temp@mamkschools.org,pace SAT Test / MHS,The College Board's SAT test is administered to students who are registered to take it.,6/6/2015,none,6/6/2015,none,events-temp@mamkschools.org,test Senior Athletic Dinner-MHS Cafe,A special dinner for MHS seniors who have participated in the athletic program.,6/8/2015,6:00 PM,6/8/2015,none,events-temp@mamkschools.org,sports PACE Senior Recital ,A recital by MHS seniors in the PACE program. All are welcome to attend.,6/9/2015,none,6/9/2015,none,events-temp@mamkschools.org,pace @@ -70,5 +70,5 @@ MHS - Graduation - Rain Date,Rain date for the graduation ceremony for the class Last Day of Classes,Last day for any exams/classes at MHS for the 2014-15 school year.,6/25/2015,none,6/25/2015,none,none,school MHS 4th Quarter Ends,The school year is completed as the 4th quarter ends.,6/25/2015,none,6/25/2015,none,none,school Summer Recess,The school year is over. Happy Summer!,6/26/2015,none,8/31/2015,none,none,school -FBLA NLC,Future Business Leaders of America National Leadership Conference in Chicago,6/29/2015,none,7/2/2015,none,events-temp@mamkschools.org,fbla +FBLA NLC,"Future Business Leaders of America National Leadership Conference in Chicago. FBLA members will have the opportunity to participate in various workshops and competitive events.",6/29/2015,none,7/2/2015,none,events-temp@mamkschools.org,fbla 2015 School Starts,The first day of the 2015-2016 School Year.,9/1/2015,8:00 AM,9/1/2015,2:30 PM,none,school \ No newline at end of file diff --git a/FBLAAPPPPT.pptx b/FBLAAPPPPT.pptx index 480030f..2ab3991 100644 Binary files a/FBLAAPPPPT.pptx and b/FBLAAPPPPT.pptx differ diff --git a/MHSEvents-Project/FBLA2015/.gitignore b/MHSEvents-Project/FBLA2015/.gitignore new file mode 100644 index 0000000..afbdab3 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/.gitignore @@ -0,0 +1,6 @@ +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build diff --git a/MHSEvents-Project/FBLA2015/.idea/.name b/MHSEvents-Project/FBLA2015/.idea/.name new file mode 100644 index 0000000..68783de --- /dev/null +++ b/MHSEvents-Project/FBLA2015/.idea/.name @@ -0,0 +1 @@ +FBLA2015 \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/.idea/compiler.xml b/MHSEvents-Project/FBLA2015/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/MHSEvents-Project/FBLA2015/.idea/compiler.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/.idea/copyright/profiles_settings.xml b/MHSEvents-Project/FBLA2015/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/.idea/gradle.xml b/MHSEvents-Project/FBLA2015/.idea/gradle.xml new file mode 100644 index 0000000..16cee90 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/.idea/misc.xml b/MHSEvents-Project/FBLA2015/.idea/misc.xml new file mode 100644 index 0000000..e284b1d --- /dev/null +++ b/MHSEvents-Project/FBLA2015/.idea/misc.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/.idea/modules.xml b/MHSEvents-Project/FBLA2015/.idea/modules.xml new file mode 100644 index 0000000..5e62e18 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/.idea/vcs.xml b/MHSEvents-Project/FBLA2015/.idea/vcs.xml new file mode 100644 index 0000000..6564d52 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/FBLA2015.iml b/MHSEvents-Project/FBLA2015/FBLA2015.iml new file mode 100644 index 0000000..8602c6f --- /dev/null +++ b/MHSEvents-Project/FBLA2015/FBLA2015.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/app/.gitignore b/MHSEvents-Project/FBLA2015/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/MHSEvents-Project/FBLA2015/app/app-release.apk b/MHSEvents-Project/FBLA2015/app/app-release.apk new file mode 100644 index 0000000..f0901a7 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/app-release.apk differ diff --git a/MHSEvents-Project/FBLA2015/app/app.iml b/MHSEvents-Project/FBLA2015/app/app.iml new file mode 100644 index 0000000..0c5e0cc --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/app.iml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/app/build.gradle b/MHSEvents-Project/FBLA2015/app/build.gradle new file mode 100644 index 0000000..4a0cab8 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/build.gradle @@ -0,0 +1,25 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 22 + buildToolsVersion "22.0.1" + + defaultConfig { + applicationId "com.aakportfolio.www.fbla2015" + minSdkVersion 15 //Ice Cream Sandwich + targetSdkVersion 22 //Lollipop + versionCode 2 + versionName "2.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(include: ['*.jar'], dir: 'libs') + compile 'com.android.support:appcompat-v7:22.1.1' +} diff --git a/MHSEvents-Project/FBLA2015/app/manifest-merger-release-report.txt b/MHSEvents-Project/FBLA2015/app/manifest-merger-release-report.txt new file mode 100644 index 0000000..13104a1 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/manifest-merger-release-report.txt @@ -0,0 +1,65 @@ +-- Merging decision tree log --- +manifest +ADDED from AndroidManifest.xml:2:1 + package + ADDED from AndroidManifest.xml:3:5 + INJECTED from AndroidManifest.xml:0:0 + INJECTED from AndroidManifest.xml:0:0 + android:versionName + INJECTED from AndroidManifest.xml:0:0 + INJECTED from AndroidManifest.xml:0:0 + xmlns:android + ADDED from AndroidManifest.xml:2:11 + android:versionCode + INJECTED from AndroidManifest.xml:0:0 + INJECTED from AndroidManifest.xml:0:0 +uses-permission#android.permission.INTERNET +ADDED from AndroidManifest.xml:5:5 + android:name + ADDED from AndroidManifest.xml:5:22 +application +ADDED from AndroidManifest.xml:7:5 +MERGED from com.android.support:appcompat-v7:21.0.3:16:5 +MERGED from com.android.support:support-v4:21.0.3:16:5 + android:label + ADDED from AndroidManifest.xml:10:9 + android:allowBackup + ADDED from AndroidManifest.xml:8:9 + android:icon + ADDED from AndroidManifest.xml:9:9 + android:theme + ADDED from AndroidManifest.xml:11:9 +activity#com.aakportfolio.www.fbla2015.MainActivity +ADDED from AndroidManifest.xml:12:9 + android:label + ADDED from AndroidManifest.xml:15:13 + android:icon + ADDED from AndroidManifest.xml:13:13 + android:name + ADDED from AndroidManifest.xml:14:13 +intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER +ADDED from AndroidManifest.xml:16:13 +action#android.intent.action.MAIN +ADDED from AndroidManifest.xml:17:17 + android:name + ADDED from AndroidManifest.xml:17:25 +category#android.intent.category.LAUNCHER +ADDED from AndroidManifest.xml:19:17 + android:name + ADDED from AndroidManifest.xml:19:27 +activity#com.aakportfolio.www.fbla2015.eventDummy +ADDED from AndroidManifest.xml:22:9 + android:label + ADDED from AndroidManifest.xml:24:13 + android:name + ADDED from AndroidManifest.xml:23:13 +uses-sdk +INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested +MERGED from com.android.support:appcompat-v7:21.0.3:15:5 +MERGED from com.android.support:support-v4:21.0.3:15:5 + android:targetSdkVersion + INJECTED from AndroidManifest.xml:0:0 + INJECTED from AndroidManifest.xml:0:0 + android:minSdkVersion + INJECTED from AndroidManifest.xml:0:0 + INJECTED from AndroidManifest.xml:0:0 diff --git a/MHSEvents-Project/FBLA2015/app/proguard-rules.pro b/MHSEvents-Project/FBLA2015/app/proguard-rules.pro new file mode 100644 index 0000000..834d764 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\DEV\Android\sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/MHSEvents-Project/FBLA2015/app/src/androidTest/java/com/aakportfolio/www/fbla2015/ApplicationTest.java b/MHSEvents-Project/FBLA2015/app/src/androidTest/java/com/aakportfolio/www/fbla2015/ApplicationTest.java new file mode 100644 index 0000000..9dc69a2 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/androidTest/java/com/aakportfolio/www/fbla2015/ApplicationTest.java @@ -0,0 +1,13 @@ +package com.aakportfolio.www.fbla2015; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * Testing Fundamentals + */ +public class ApplicationTest extends ApplicationTestCase { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/app/src/main/AndroidManifest.xml b/MHSEvents-Project/FBLA2015/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..4d5871c --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/AndroidManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_art-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_art-web.png new file mode 100644 index 0000000..8090a73 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_art-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_award-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_award-web.png new file mode 100644 index 0000000..7629db1 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_award-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_dance-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_dance-web.png new file mode 100644 index 0000000..70e5cfa Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_dance-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_fbla-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_fbla-web.png new file mode 100644 index 0000000..6b276a6 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_fbla-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_graduation-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_graduation-web.png new file mode 100644 index 0000000..d88eb35 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_graduation-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_music-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_music-web.png new file mode 100644 index 0000000..8250ea0 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_music-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_pace-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_pace-web.png new file mode 100644 index 0000000..2b7158c Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_pace-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_research-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_research-web.png new file mode 100644 index 0000000..bbf9140 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_research-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_sports-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_sports-web.png new file mode 100644 index 0000000..a5907b3 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_sports-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/ic_test-web.png b/MHSEvents-Project/FBLA2015/app/src/main/ic_test-web.png new file mode 100644 index 0000000..bc9ab8e Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/ic_test-web.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/Downloader.java b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/Downloader.java new file mode 100644 index 0000000..43338be --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/Downloader.java @@ -0,0 +1,157 @@ +//Filename: Downloader.java +/** + * This class contains the ASync Task used for downloading updates + * + * Created by Andrew Katz on 5/1/2015. + * Version 2.0 released 5/4/2015. + * + * @author Andrew Katz + * @version 2.0 + */ + +package com.aakportfolio.www.fbla2015; + +//Imports Section + +import android.app.ProgressDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.os.AsyncTask; +import android.widget.Toast; + +import java.io.BufferedInputStream; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.net.URLConnection; + + +public class Downloader extends AsyncTask { + //This variable holds the main activity, and the context for the progress dialog, etc. + private MainActivity mainActivity; + + //This boolean will keep track of whether we fail or not + private boolean fail; + + //This holds our progress dialog so we can close it at the end. + private ProgressDialog progress; + + /** + * Constructor. Runs first, when task is created. + * + * @param caller + */ + public Downloader(MainActivity caller) { + mainActivity = caller; + progress = ProgressDialog.show(mainActivity, "Downloading updated events...", + "Please wait, downloading...", true, true, + new DialogInterface.OnCancelListener() { + @Override + public void onCancel(DialogInterface dialog) { + Downloader.this.cancel(true); + } + }); + } + + @Override + protected void onPreExecute() { + fail = true; + } + + /** + * Main background method. This is where the download happens + * + * @param params Required + * @return null + */ + @Override + protected Void doInBackground(Void... params) { + //Try to download + try { + //Connect to website + URL website = new URL(MHSConstants.downloadURL); + URLConnection connection = website.openConnection(); + connection.connect(); + InputStream input = new BufferedInputStream(website.openStream()); + + //Create output stream to write file to internal storage + FileOutputStream outputStream = mainActivity.openFileOutput(MHSConstants.calName + 1, + Context.MODE_PRIVATE); + + //This array will hold the downloaded data + byte data[] = new byte[1024]; + + //Count how much data we downloaded + int count; + while ((count = input.read(data)) != -1) { + // write "count" amount of data to the file + outputStream.write(data, 0, count); + } + + //Flush and close the output and input + outputStream.flush(); + outputStream.close(); + input.close(); + + //Copy now that we have fully downloaded + copy(mainActivity.openFileInput(MHSConstants.calName + 1), + mainActivity.openFileOutput(MHSConstants.calName, Context.MODE_PRIVATE)); + //Note that we did not fail + fail = false; + } catch (Exception e) { + //If we fail, output debug info (if in debug mode + if (MHSConstants.debug) { + e.printStackTrace(); + } + + //Also note that we failed + fail = true; + } + return null; + } + + /** + * This method is called when background task is done + * + * @param result we do not care + */ + @Override + protected void onPostExecute(Void result) { + //See if we failed, and tell the user what happened + if (fail) { + //Tell them we failed + Toast.makeText(mainActivity, "Could not download event list.", + Toast.LENGTH_SHORT).show(); + } else { + //Tell the user we succeeded + + Toast.makeText(mainActivity, + "Update completed.", Toast.LENGTH_SHORT).show(); + //Refill the listview + mainActivity.fillListView(); + } + //Dismiss progress bar + progress.dismiss(); + } + + /** + * Copies a file to another by input stream + * @param in FileInputStream from input file + * @param out FileOutputStream to out file + * @throws IOException if error + */ + public void copy(FileInputStream in, FileOutputStream out) throws IOException { + + // Transfer bytes from in to out + byte[] buf = new byte[1024]; + int len; + while ((len = in.read(buf)) > 0) { + out.write(buf, 0, len); + } + in.close(); + out.flush(); + out.close(); + } +} diff --git a/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MHSConstants.java b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MHSConstants.java new file mode 100644 index 0000000..75734f9 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MHSConstants.java @@ -0,0 +1,27 @@ +package com.aakportfolio.www.fbla2015; + + +/** + * This class contains variables that are commonly used throughout the app for easy access. + * + * Created by Andrew Katz on 5/1/2015. + * Version 2.0 released 5/4/2015. + * + * @author Andrew Katz + * @version 2.0 + */ +public final class MHSConstants { + //Preference name + public static final String lastUpdatePrefName = "lastUpdatePref"; + + //Calandar Filename + public static final String calName = "cal.csv"; + + //File download URL. Can be changed to the school if needed. + //Currently uses a link from GitHub due to lack of access to school web server, + //and administrative restrictions on the school web server that prevent easy access + public static final String downloadURL = "http://aakatz3.github.io/2015MamkFBLAApp/cal.csv"; + + //Debug mode (print stack traces and logs) + public static final boolean debug = false; +} diff --git a/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MHSEvent.java b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MHSEvent.java new file mode 100644 index 0000000..4a63cb9 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MHSEvent.java @@ -0,0 +1,344 @@ +//Filename: MHSEvent.java +/** + * This is a class for each event + * This object is for storing an event (1 line from the CSV file) + * + * Created by Andrew on 1/19/2015. + * Version 2.0 released 5/4/2015. + * + * @author Andrew Katz + * @version 2.0 + */ + +package com.aakportfolio.www.fbla2015; + +//Import section + +import java.io.Serializable; +import java.util.GregorianCalendar; +import java.util.regex.Pattern; +//End of imports + +public class MHSEvent implements Serializable, Comparable { + + //Instance variables. They have some defaults here for purposes of examples + + //If event is all day + boolean isAllDay = true; + //Event name + private String eventName = "Untitled Event"; + //Event Description + private String eventDescription = "No Description"; + //Email Address + private String contactEmail = "events-temp@mamkschools.org"; + //Date variables + private int MM = 0; + private int DD = 0; + private int YYYY = 0; + private String eventStartDate = "00/00/0000"; + private String eventEndDate = "00/00/0000"; + //Millisecond variables + private long startMillisec = 0; + private long endMillisec = 0; + //Type of event (for graphic) + private String eventType = "none"; + + + /** + * Constructor for event. + * + * @param name Event name + * @param Description Event Description + * @param startDate Event date (MM/DD/YYYY) + * @param startTime Start time for event (HH:MM AM/PM) + * @param endDate Ending date of event (MM/DD/YYYY) + * @param endTime End time (HH:MM AM/PM) + * @param email email address + * @param type event type. Should be in the hashmap. + */ + public MHSEvent(String name, String Description, String startDate, String startTime, + String endDate, String endTime, String email, String type) { + //Initialize variables + eventName = name; + startMillisec = 0; + endMillisec = 0; + isAllDay = true; + eventDescription = eventName + "\n"; + if (!startTime.trim().equals("none")) { + if (startTime.trim().equals("allday")) { + //If there is an all day event for start time, note it + eventDescription += "All day event" + "\n"; + } else { + //If we have specific times... + try { + { + //Try to calculate milliseconds + long hours = Long.parseLong(startTime.split(":")[0]); + long minutes = Long.parseLong(startTime.split(":")[1].split(" ")[0]); + String ampm = startTime.substring(startTime.indexOf(" ") + 1); + if (ampm.equals("PM")) hours += 12L; + minutes += hours * 60L; + long seconds = minutes * 60L; + //If we reach this point, we have a valid time, so write the variables + startMillisec = seconds * 1000L; + endMillisec = startMillisec; + isAllDay = false; + eventDescription += "Start time: " + startTime + "\n"; + } + if (!endTime.trim().equals("none")) { + try { + //Try to calculate milliseconds + long hours = Long.parseLong(endTime.split(":")[0]); + long minutes = Long.parseLong(endTime.split(":")[1].split(" ")[0]); + String ampm = startTime.substring(endTime.indexOf(" ") + 1); + if (ampm.equals("PM")) hours += 12L; + minutes += hours * 60L; + long seconds = minutes * 60L; + //If we reach this point, we have a valid time, so write variables + endMillisec = seconds * 1000L; + eventDescription += "End Time: " + endTime + "\n"; + } catch (Exception e) { + if(MHSConstants.debug){ + e.printStackTrace(); + } + //Leave it blank, treat it as if there is no end time + } + } + } catch (Exception e) { + //Just use the defaults, and treat it as no start time if invalid + } + } + } + //Set description, if we have one + if (!Description.trim().equals("none")) { + eventDescription += Description; + } + + //Try to set dates + try { + MM = Integer.parseInt(startDate.split(Pattern.quote("/"))[0]); + DD = Integer.parseInt(startDate.split(Pattern.quote("/"))[1]); + YYYY = Integer.parseInt(startDate.split(Pattern.quote("/"))[2]); + eventEndDate = endDate; + eventStartDate = startDate; + } catch (Exception e) { + //If invalid date, basically nullify the event + MM = 0; + DD = 0; + YYYY = 0; + eventStartDate = "00/00/0000"; + eventEndDate = "00/00/0000"; + if(MHSConstants.debug) { + e.printStackTrace(); + } + } + //Set the last variables + contactEmail = email.trim(); + eventType = type.trim(); + } + + /** + * This constructor takes an array (from String.split) and passes it to the main constructor. + * Precondition: inArr has length of 8 + * @param inArr Array of all the same paramaters of main constructor + */ + public MHSEvent(String[] inArr) { + this(inArr[0], inArr[1], inArr[2], inArr[3], inArr[4], inArr[5], inArr[6], inArr[7]); + } + + + /** + * Compares date and sees if should be displayed. + * + * @param nowMM Current Month + * @param nowDD Current Day + * @param nowYYYY Current Year + * @return Compares date and sees if should be displayed. + */ + public boolean showEvent(int nowMM, int nowDD, int nowYYYY) { + try { + int MM1 = Integer.parseInt(eventEndDate.split(Pattern.quote("/"))[0]), + DD1 = Integer.parseInt(eventEndDate.split(Pattern.quote("/"))[1]), + YYYY1 = Integer.parseInt(eventEndDate.split(Pattern.quote("/"))[2]); + if (nowYYYY > YYYY1) return false; + return nowYYYY >= YYYY1 && ((nowYYYY != YYYY1) || ((nowMM < MM1) || (nowMM <= MM1 && nowDD <= DD1))); + } catch (Exception e) { + if (MHSConstants.debug){ + e.printStackTrace(); + } + return false; + } + } + + /** + * Compares MHSEvetns by start date. For sorting. + * + * @param another Another object to compare to + * @return value of object comparison (- is less, 0 i equal, 1 is greater) + */ + @Override + public int compareTo(Object another) { + if (another == null || !(another instanceof MHSEvent)) return -1; + int[] anotherEventDateArray = ((MHSEvent) another).getDateFields(); + if (YYYY < anotherEventDateArray[2]) { + return -1; + } else if (YYYY > anotherEventDateArray[2]) { + return 1; + } else { + if (MM < anotherEventDateArray[0]) { + return -1; + } else if (MM > anotherEventDateArray[0]) { + return 1; + } else { + if (DD < anotherEventDateArray[1]) { + return -1; + } else if (DD > anotherEventDateArray[1]) { + return 1; + } else { + return 0; + } + } + } + } + + /** + * toString: returns event name + * + * @return event name + */ + @Override + public String toString() { + return getEventName(); + } + + //Begin getter methods + + /** + * Getter for start calendar + * @return returns GregorianCalendar object of start date + */ + public GregorianCalendar getCalStart() { + return new GregorianCalendar(YYYY, MM, DD); + } + + /** + * Getter for end calendar + * @return returns GregorianCalendar for event end date + */ + public GregorianCalendar getCalEnd() { + try { + int MM1 = Integer.parseInt(eventEndDate.split(Pattern.quote("/"))[0]), + DD1 = Integer.parseInt(eventEndDate.split(Pattern.quote("/"))[1]), + YYYY1 = Integer.parseInt(eventEndDate.split(Pattern.quote("/"))[2]); + return new GregorianCalendar(YYYY1, MM1, DD1); + } catch (Exception e) { + if(MHSConstants.debug){ + e.printStackTrace(); + } + return new GregorianCalendar(YYYY, MM, DD); + } + + } + + /** + * getter for eventType + * @return eventType + */ + public String getEventType() { + return eventType; + } + + /** + * Getter for start milliseconds + * @return startMillisec + */ + public long startMS() { + return startMillisec; + } + + /** + * Getter for end milliseconds + * @return endMillisec + */ + public long endMS() { + return endMillisec; + } + + /** + * Getter for all day boolean + * @return isAllDay + */ + public boolean getIsAllDay() { + return isAllDay; + } + + /** + * Getter for event name + * @return eventName + */ + public String getEventName() { + return eventName; + } + + /** + * Getter for event description + * @return eventDescription + */ + public String getEventDescription() { + return eventDescription; + } + + /** + * Getter for contact email + * @return contactEmail + */ + public String getContactEmail() { + return contactEmail; + } + + /** + * getter for event dates + * @return If event has only start date, just return that, else return start and end date. + */ + public String getEventDates() { + return eventStartDate.equals(eventEndDate) + ? "Date: " + eventStartDate + : "Starts: " + eventStartDate + + "\n" + "Ends: " + eventEndDate; + } + + /** + * Getter for start date + * @return eventStartDate + */ + public String getEventStartDate() { + return eventStartDate; + } + + /** + * Getter for the end date + * @return eventEndDate + */ + public String getEventEndDate() { + return eventEndDate; + } + + /** + * Getter for teh date fields in array + * @return An array with month, date, year of event start + */ + public int[] getDateFields() { + return new int[]{MM, DD, YYYY}; + } + + //End of getter methods + + /** + * Says if email should be shown + * + * @return if event should be shown + */ + public boolean showEmail() { + return !contactEmail.equals("none"); + } +} diff --git a/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MainActivity.java b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MainActivity.java new file mode 100644 index 0000000..f56c919 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/MainActivity.java @@ -0,0 +1,554 @@ +//Filename: MainActivity.java +/** + * This is the starting activity for this android app. + * Upon launching the app, this file is used. + * + * Created by Andrew on 1/19/2015. + * Version 2.0 released 5/4/2015. + * + * @author Andrew Katz + * @version 2.0 + */ +package com.aakportfolio.www.fbla2015; + +//Import Section + +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.net.ConnectivityManager; +import android.net.NetworkInfo; +import android.net.Uri; +import android.os.AsyncTask; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.view.View; +import android.widget.AdapterView; +import android.widget.AdapterView.OnItemClickListener; +import android.widget.ListView; +import android.widget.SimpleAdapter; +import android.widget.Toast; +import android.widget.ViewFlipper; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStreamReader; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Scanner; + +//End of Imports + +public class MainActivity extends AppCompatActivity implements View.OnClickListener { + //This arraylist contains events from file + private ArrayList Events; + + //ListView on main page + private ListView LV; + + //This string allows us to update data only once per day + private String lastUpdate; + + /** + * This is the starting method (like main) + * It runs when the application is loaded into memory + * + * @param savedInstanceState Pass to super + */ + @Override + protected void onCreate(Bundle savedInstanceState) { + //Android setup + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + SharedPreferences prefs = getSharedPreferences("MHSEvents", MODE_PRIVATE); + lastUpdate = prefs.getString(MHSConstants.lastUpdatePrefName, ""); + + //Get the listview in the app, so we can later manipulate it + LV = (ListView) findViewById(R.id.listView); + //Set our onclick listener for the listview (item selected) + LV.setOnItemClickListener(new OnItemClickListener() { + + public void onItemClick(AdapterView arg0, View arg1, int position, long arg3) { + //Create an intent for the activity that displays events + Intent intent = new Intent(MainActivity.this, eventDummy.class); + + //Tell the activity what event was selected + intent.putExtra("event", Events.get(position)); + + //Start the activity + startActivity(intent); + } + }); + + //Display our icon in the title bar + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.setDisplayShowHomeEnabled(true); + actionBar.setIcon(R.drawable.ic_launcher); + } + + //If we are in portrait, setup the ViewFlipper (banner) + if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { + ViewFlipper banner = (ViewFlipper) findViewById(R.id.viewFlipper); + banner.setOnClickListener(this); + banner.setInAnimation(this, R.animator.fade_in); + banner.setOutAnimation(this, R.animator.fade_out); + banner.setAnimateFirstView(false); + banner.startFlipping(); + } + //Fill listview for initial time + fillListView(); + } + + /** + * This method is called after onCreate, when an app is in memory and reopened, + * and the orientation is changed. + * We will fill/refill the listview here so if user + * resumes app the next day, old events will be purged. + */ + @Override + protected void onResume() { + //Always call the super class + super.onResume(); + + //See if the listview was refilled today, and update performed + if (!new SimpleDateFormat("MM/dd/yyyy").format(new Date()).equals(lastUpdate)) { + //If we didn't update today and refill today + //Set update to today + lastUpdate = new SimpleDateFormat("MM/dd/yyyy").format(new Date()); + //Let's check if there is internet + if (isNetworkAvailable()) { //Check if there is internet + //If we have internet, perform an update. + update(); + } + //Refill to remove old events and add new ones + //Fill the listview + fillListView(); + } + } + + /** + * This method is called whenever the view is hidden (another view opened, etc.) + * We commit the preference just in case, to prevent needless re-updates + */ + @Override + public void onPause() { + //Call super first + super.onPause(); + + //Save update date + SharedPreferences.Editor editor = getSharedPreferences("MHSEvents", MODE_PRIVATE).edit(); + editor.putString(MHSConstants.lastUpdatePrefName, lastUpdate); + editor.commit(); + } + + /** + * This method is called before the app is closed. We make sure to save the update date here + */ + @Override + protected void onDestroy() { + //Save update date + SharedPreferences.Editor editor = getSharedPreferences("MHSEvents", MODE_PRIVATE).edit(); + editor.putString(MHSConstants.lastUpdatePrefName, lastUpdate); + editor.commit(); + + //Call super last, to ensure that we commit + super.onDestroy(); + } + + /** + * This method first removes events that shouldn't be shown, + * then sorts the events that remain + */ + private void orderAndRemoveEvents() { + //Save variables for the current date + Date date = new Date(); + int year = Integer.parseInt(new SimpleDateFormat("yyyy").format(date)), + month = Integer.parseInt(new SimpleDateFormat("MM").format(date)), + day = Integer.parseInt(new SimpleDateFormat("dd").format(date)); + + //Go through the arraylist of all events. If it shouldn't be shown, remove it + for (int i = 0; i < Events.size(); i++) { + if (!Events.get(i).showEvent(month, day, year)) { + Events.remove(i); + //Fix position in the arraylist to prevent off-by-one bug + i--; + } + } + + //Use Collections.sort to sort our ArrayList, using our compareTo method + Collections.sort(Events); + } + + /** + * This method reads lines from the event list, and returns the string + * containing all the lines + * + * @return Lines from calendar file + */ + private String readLines() { + //Try a maximum of three times to read lines from the file. + //If we fail, reset the file to default, and try again + for (int i = 0; i < 3; i++) { + try { + //Create a string to hold the file lines + String fileLines = ""; + //Open file from internal storage + Scanner scan = new Scanner(openFileInput(MHSConstants.calName)); + + //First line is just headers, so just throw it away. + scan.nextLine(); + + //Read lines until none are left, and append to string + while (scan.hasNextLine()) { + String tmp = scan.nextLine() + "\n"; + fileLines += tmp; + } + + //If we made it to here, we succeeded. + //Therefore, we can close the file and return the lines + scan.close(); + return fileLines; + } catch (Exception e) { + //If we failed, use the default data + makeCSV(); + } + } + //If we made it here, there is something wrong. + //We will just return an empty string + return ""; + } + + /** + * This function gets the lines from the file + * and puts them into an ArrayList of events. Just an overloaded header for simplicity + */ + private void readFileIntoArrayList() { + readFileIntoArrayList(0); + } + + /** + * This function actually reads the lines of the file into the ArrayList + * @param tries try number, to prevent infinite recursion + */ + private void readFileIntoArrayList(int tries) { + //Start by initializing the arraylist + Events = new ArrayList<>(0); + + if (!fileExists(MHSConstants.calName)) { + //If the CSV doesn't exist, make a new one + makeCSV(); + } + + + for (String str : readLines().split("\n")) { + //Split the line at commas, except those in quotes (using this regular expression) + String[] line = str.split(",(?=([^\"]*\"[^\"]*\")*[^\"]*$)"); + + //If we have the right number of fields + if (line.length == 8) { + //Split the line and make a new event from it, removing quotes + for (int i = 0; i < line.length; i++) { + //Remove any quotes now that lines are split, for better readability + if(line[i].charAt(0) == '"' && line[i].charAt(line[i].length() - 1) == '"'){ + line[i] = line[i].substring(1, line[i].length() - 1); + } + } + //Add the new event + Events.add(new MHSEvent(line)); + } + } + + orderAndRemoveEvents(); + if (Events.size() == 0) { + //If there are no events after sorting, or if the file was empty + if (tries < 2) { + //If we haven't tried twice yet... + //Tell the user we are resetting... + Toast.makeText(this, R.string.eventError, + Toast.LENGTH_SHORT).show(); + + //Then reset + makeCSV(); + + //And try again + readFileIntoArrayList(tries + 1); + } else { + //If we went through twice and still have no events, + //Something is wrong. + + //Tell the user we have no events + Toast.makeText(this, R.string.noEvents, + Toast.LENGTH_LONG).show(); + + //Reset the events list, to be safe + Events = new ArrayList<>(); + + //Then add a fake event to remind the user about the problem. + Events.add(new MHSEvent("Cannot load events", + "Something bad happened and we cannot load events. Please check your " + + "date and time settings and try an update.", + new SimpleDateFormat("MM/dd/yyyy").format(new Date()), "none", + new SimpleDateFormat("MM/dd/yyyy").format(new Date()), "none", + "none", "none")); + } + } + } + + /** + * This method will refill the listview + * from the file on the internal storage + */ + public void fillListView() { + //Initialize the array + readFileIntoArrayList(); + + //Create an arraylist for our info that will go in the listview + List> data = new ArrayList<>(); + + //Go through the events, pull out the relevent info, and save it in the list + for (MHSEvent item : Events) { + Map datum = new HashMap<>(2); + datum.put("title", item.toString()); + + //If there is one date, show that. If there are separate start + //and end dates, show both + datum.put("date", item.getEventStartDate().equals(item.getEventEndDate()) + ? item.getEventStartDate() + : item.getEventStartDate() + " - " + item.getEventEndDate()); + + //Add our map to the list + data.add(datum); + } + + //Create an adapter for the listview, using the list we created + SimpleAdapter adapter = new SimpleAdapter(this, data, android.R.layout.simple_list_item_2, + new String[]{"title", "date"}, new int[]{android.R.id.text1, android.R.id.text2}); + + //Set the listview's adapter to this one, and update the listview + LV.setAdapter(adapter); + adapter.notifyDataSetChanged(); + } + + + /** + * This method will create a new csv. + * Called when none is found, or a corrupted one is detected + */ + private void makeCSV() { + //Create a scanner to read the integrated file + Scanner s = new Scanner(new InputStreamReader(getResources().openRawResource(R.raw.cal))); + + //Create a string to store filelines + String fileLines = ""; + + //Read each line in the file and add it to the string + while (s.hasNextLine()) { + fileLines += s.nextLine() + "\n"; + } + + //Close input file + s.close(); + + //Try to write our file to storage + try { + //Create output stream to internal storage + FileOutputStream outputStream; + outputStream = openFileOutput(MHSConstants.calName, Context.MODE_PRIVATE); + + //Write bytes from string + outputStream.write(fileLines.getBytes()); + + //Flush and close output + outputStream.flush(); + outputStream.close(); + } catch (Exception e) { + if (MHSConstants.debug) { + e.printStackTrace(); + } + } + } + + /** + * This method updates calender database stored on internal storage + */ + private void update() { + //Create and show a dialog to tell teh user we are updating + //Download the file in an async task. + AsyncTask task = new Downloader(this); + + //Run the previously defined task + task.execute((Void[]) null); + lastUpdate = new SimpleDateFormat("MM/dd/yyyy").format(new Date()); + } + + /** + * Standard android code for options menu + * + * @param menu menu of app + * @return super's return + */ + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + // Inflate the menu items for use in the action bar + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.menu_main, menu); + return super.onCreateOptionsMenu(menu); + } + + /** + * Show about box + */ + private void showAbout() { + //Create an alert dialog builder for a new alert dialog + AlertDialog.Builder builder = new AlertDialog.Builder(this); + + //Set the title and message + builder.setIcon(R.drawable.ic_launcher) + .setMessage(R.string.about_message) + .setTitle(R.string.about_title); + + //Add an OK button + builder.setPositiveButton(R.string.ok, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + //Close dialog when user presses OK + dialog.dismiss(); + } + }); + //Create the actual dialog from the builder, then show it. + AlertDialog dialog = builder.create(); + dialog.show(); + } + + /** + * This method deals with action bar selections + * + * @param item selected item + * @return whether action was performed + */ + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + + //Get ID of selected item + int id = item.getItemId(); + switch (id) { + case R.id.action_update: + //For update button, try to update + update(); + return true; + case R.id.action_about: + //For about button, show about box + showAbout(); + return true; + case R.id.action_facebook: + //For facebook button, open Mamkschools facebook + if (!openURL("fb://facewebmodal/f?href=" + + "http://www.facebook.com/MamaroneckPublicSchools")) { + //If facebook isn't installed, try again with browser + openURL("http://www.facebook.com/MamaroneckPublicSchools"); + } + return true; + case R.id.action_twitter: + //For twitter button, try to open twitter app to Mamkschools + if (!openURL("twitter://user?screen_name=MamaroneckED")) { + //If twitter isn't installed, try again with browser + openURL("http://www.twitter.com/MamaroneckED"); + } + return true; + case R.id.action_website: + //Open browser to Mamkschools page + openURL("http://mhs.mamkschools.org/"); + return true; + default: + return super.onOptionsItemSelected(item); + } + } + + /** + * Open a URL + * + * @param url URL to open + * @return If the URL was opened + */ + private boolean openURL(String url) { + try { + //Try to open page with browser or other app + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); + startActivity(browserIntent); + return true; + } catch (Exception e) { + //If error, print stack and return false + if (MHSConstants.debug) { + e.printStackTrace(); + } + return false; + } + } + + /** + * @return If there is a network connection available + */ + private boolean isNetworkAvailable() { + ConnectivityManager connectivityManager + = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); + NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); + return activeNetworkInfo != null && activeNetworkInfo.isConnected(); + } + + /** + * @param fname File name to check + * @return If the file exists or not + */ + public boolean fileExists(String fname) { + File file = getBaseContext().getFileStreamPath(fname); + return file.exists(); + } + + + /** + * onClick, called when something clickable is tapped + * @param view View that was clicked + */ + public void onClick(View view) { + //See what view was clicked + switch (view.getId()) { + case R.id.viewFlipper: + //If we are in portrait, pause/unpause viewflipper + if (getResources().getConfiguration().orientation + == Configuration.ORIENTATION_PORTRAIT) { + ViewFlipper banner = (ViewFlipper) view; + //Are we flipping now? + if (banner.isFlipping()) { + //If yes, stop + banner.stopFlipping(); + } else { + //If no, show next image, then start flipping + banner.showNext(); + banner.startFlipping(); + } + } + break; + default: + break; + } + + } +} \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/eventDummy.java b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/eventDummy.java new file mode 100644 index 0000000..a1d2b42 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/java/com/aakportfolio/www/fbla2015/eventDummy.java @@ -0,0 +1,267 @@ +//Filename: eventDummy.java +/** + * This is the activity for each event in this android app. + * Upon selecting an event, this loads, and is changed based on the event. + * + * Created by Andrew on 1/19/2015. + * Version 2.0 released 5/4/2015. + * + * @author Andrew Katz + * @version 2.0 + */ +package com.aakportfolio.www.fbla2015; + +//Import section + +import android.app.AlertDialog; +import android.content.ActivityNotFoundException; +import android.content.DialogInterface; +import android.content.Intent; +import android.os.Bundle; +import android.provider.CalendarContract; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; +import android.view.MenuItem; +import android.view.View; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.TextView; +import android.widget.Toast; + +import java.util.HashMap; +//End of import section + +public class eventDummy extends AppCompatActivity implements View.OnClickListener { + //Image map used to get images for event types + private static final HashMap imageMap = makeMap(); + + //Event passed from MainActivity + private MHSEvent myEvent; + + /** + * Makes the hashmap for images + * Used for setting constant + * + * @return Completed map + */ + private static HashMap makeMap() { + HashMap map = new HashMap<>(); + map.put("none", R.drawable.ic_launcher); + map.put("pace", R.mipmap.ic_pace); + map.put("music", R.mipmap.ic_music); + map.put("test", R.mipmap.ic_test); + map.put("sports", R.mipmap.ic_sports); + map.put("school", R.mipmap.ic_school); + map.put("art", R.mipmap.ic_art); + map.put("research", R.mipmap.ic_research); + map.put("graduation", R.mipmap.ic_graduation); + map.put("dance", R.mipmap.ic_dance); + map.put("award", R.mipmap.ic_award); + map.put("fbla", R.mipmap.ic_fbla); + return map; + } + + /** + * This method runs on launch of the activity + * + * @param savedInstanceState To match superclass + */ + @Override + protected void onCreate(Bundle savedInstanceState) { + //Standard android setup + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_event_dummy); + + //Enable back/up button in action bar + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.setDisplayShowHomeEnabled(true); + } + + //Get event passed to this activity + Intent intent = getIntent(); + myEvent = (MHSEvent) intent.getSerializableExtra("event"); + + //Setup UI components based on event + { + //Set title + setTitle(myEvent.toString()); + + //Show Dates + TextView dateTextView = (TextView) findViewById(R.id.dateView); + dateTextView.setText(myEvent.getEventDates()); + + //Show Description + TextView descriptionTextView = (TextView) findViewById(R.id.descriptionView); + descriptionTextView.setText(myEvent.getEventDescription()); + + //See if email button should be shown, set accordingly + Button emailBtn = (Button) findViewById(R.id.emailButton); + emailBtn.setClickable(myEvent.showEmail()); + emailBtn.setVisibility(myEvent.showEmail() ? View.VISIBLE : View.GONE); + emailBtn.setOnClickListener(this); + + //Setup share button and calender button + Button shareBtn = (Button) findViewById(R.id.shareBtn); + shareBtn.setOnClickListener(this); + Button calBtn = (Button) findViewById(R.id.calBtn); + calBtn.setOnClickListener(this); + + //Setup event image + setImage((ImageView) findViewById(R.id.eventImg), myEvent.getEventType()); + } + } + + /** + * Sets image based on type of event, using thing in constants + * + * @param iv Imageview to change + * @param type Type of event + */ + private void setImage(ImageView iv, String type) { + iv.setImageResource(imageMap.get(type) != null ? imageMap.get(type) : imageMap.get("none")); + } + + /** + * onClick method handles button clicks + * + * @param v View that sent onclick + */ + @Override + public void onClick(View v) { + //Call method based on what button was clicked + switch (v.getId()) { + case R.id.emailButton: + doEmail(); + break; + case R.id.shareBtn: + doShare(); + break; + case R.id.calBtn: + doCal(); + break; + default: + //Do nothing + } + } + + /** + * This method handles the email + */ + private void doEmail() { + //Setup dialog + AlertDialog.Builder emailDialog = new AlertDialog.Builder(this); + //Set title and message + emailDialog.setTitle("Email Organizer"); + emailDialog.setMessage("Are you sure you want to send an email to the event organizer " + + "(email address: " + myEvent.getContactEmail() + ")?"); + //Set buttons + emailDialog.setPositiveButton(android.R.string.yes, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + sendEmail(); + } + }); + emailDialog.setNegativeButton(android.R.string.no, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + } + }); + //Show dialog + emailDialog.setIcon(android.R.drawable.ic_dialog_email).create().show(); + } + + /** + * This method will send the email + */ + private void sendEmail() { + //Create intent to send email + final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); + + //Set the data of the email from the event + emailIntent.setType("plain/text"); + emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, + new String[]{myEvent.getContactEmail()}); + emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, + "Questions about an event: " + myEvent); + emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, + "Please explain your questions here."); + + + try { + //Start the intent to send email + startActivity(emailIntent); + } catch (ActivityNotFoundException ex) { + //If no email apps are installed, and the chooser crashes, tell user ourselves + Toast.makeText(eventDummy.this, "No email clients installed.\nYou may manually email " + + "this address: " + myEvent.getContactEmail(), Toast.LENGTH_LONG).show(); + } + + } + + /** + * This method handles sharing the event + */ + private void doShare() { + //Create a string with our sharing message + String message = "Check out this event at MHS: " + myEvent.getEventName() + " (" + + myEvent.getEventStartDate() + ")"; + + //Try to share the event by creating a text intent, and starting a chooser + try { + Intent share = new Intent(Intent.ACTION_SEND); + share.setType("text/plain"); + share.putExtra(Intent.EXTRA_TEXT, message); + startActivity(Intent.createChooser(share, "Please choose an application to share" + + " event with")); + } catch (Exception e) { + //If we don't have anything to share with, just tell the user + Toast.makeText(this, "No sharable applications found...", Toast.LENGTH_SHORT).show(); + } + } + + /** + * This method handles the calendar + */ + private void doCal() { + try { + //Try to crate a calander intent from event, and launch it + Intent calIntent = + new Intent(Intent.ACTION_INSERT); + calIntent.setType("vnd.android.cursor.item/event"); + calIntent.putExtra(CalendarContract.Events.TITLE, myEvent.getEventName()); + calIntent.putExtra(CalendarContract.Events.DESCRIPTION, myEvent.getEventDescription()); + calIntent.putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, myEvent.getIsAllDay()); + calIntent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, myEvent.getCalStart() + .getTimeInMillis() + myEvent.startMS()); + calIntent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, myEvent.getCalEnd() + .getTimeInMillis() + myEvent.endMS()); + startActivity(calIntent); + } catch (Exception e) { + //If this fails, (which it shouldn't), tell user + if (MHSConstants.debug) { + e.printStackTrace(); + } + Toast.makeText(this, "Error creating calendar event. Is calendar installed and " + + "working?", Toast.LENGTH_SHORT).show(); + } + } + + /** + * Handle the back/home/up button on the action bar + * @param item Selected actiion item + * @return If we have an action for it + */ + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + // Respond to the action bar's Up/Home/Back button + case android.R.id.home: + //Return to activity in last state by closing this activity + finish(); + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/MHSEvents-Project/FBLA2015/app/src/main/mvstcdxx.lst b/MHSEvents-Project/FBLA2015/app/src/main/mvstcdxx.lst new file mode 100644 index 0000000..093489a Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/mvstcdxx.lst differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/animator/fade_in.xml b/MHSEvents-Project/FBLA2015/app/src/main/res/animator/fade_in.xml new file mode 100644 index 0000000..3146712 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/res/animator/fade_in.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/animator/fade_out.xml b/MHSEvents-Project/FBLA2015/app/src/main/res/animator/fade_out.xml new file mode 100644 index 0000000..52993fd --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/res/animator/fade_out.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi-v11/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi-v11/ic_email.png new file mode 100644 index 0000000..4ad5ada Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi-v11/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi-v9/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi-v9/ic_email.png new file mode 100644 index 0000000..e3fcdfc Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi-v9/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_about.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_about.png new file mode 100644 index 0000000..9244b83 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_about.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_email.png new file mode 100644 index 0000000..ef37e10 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_facebook.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_facebook.png new file mode 100644 index 0000000..df5775b Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_facebook.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_launcher.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..790cd2b Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_social.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_social.png new file mode 100644 index 0000000..a5809fc Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_social.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_twitter.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_twitter.png new file mode 100644 index 0000000..16274e7 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_twitter.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_update.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_update.png new file mode 100644 index 0000000..c24f067 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_update.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_website.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_website.png new file mode 100644 index 0000000..612a5f2 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-hdpi/ic_website.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi-v11/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi-v11/ic_email.png new file mode 100644 index 0000000..05fe8d0 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi-v11/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi-v9/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi-v9/ic_email.png new file mode 100644 index 0000000..e2e02e7 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi-v9/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_about.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_about.png new file mode 100644 index 0000000..39c594b Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_about.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_email.png new file mode 100644 index 0000000..4284c62 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_facebook.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_facebook.png new file mode 100644 index 0000000..6054c00 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_facebook.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_launcher.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..baa4b3d Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_social.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_social.png new file mode 100644 index 0000000..054564f Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_social.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_twitter.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_twitter.png new file mode 100644 index 0000000..6230fd6 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_twitter.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_update.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_update.png new file mode 100644 index 0000000..979895e Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_update.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_website.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_website.png new file mode 100644 index 0000000..f7e8dcf Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-mdpi/ic_website.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi-v11/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi-v11/ic_email.png new file mode 100644 index 0000000..2c88f5c Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi-v11/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi-v9/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi-v9/ic_email.png new file mode 100644 index 0000000..ddefc61 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi-v9/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_about.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_about.png new file mode 100644 index 0000000..9d36950 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_about.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_email.png new file mode 100644 index 0000000..81b27d3 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_facebook.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_facebook.png new file mode 100644 index 0000000..dd017fc Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_facebook.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_launcher.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..011f472 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_social.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_social.png new file mode 100644 index 0000000..d6bce3e Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_social.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_twitter.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_twitter.png new file mode 100644 index 0000000..e2a25d9 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_twitter.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_update.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_update.png new file mode 100644 index 0000000..722bd96 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_update.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_website.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_website.png new file mode 100644 index 0000000..e1b21d3 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/ic_website.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p0.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p0.jpg new file mode 100644 index 0000000..d7f9195 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p0.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p1.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p1.jpg new file mode 100644 index 0000000..cb14126 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p1.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p10.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p10.jpg new file mode 100644 index 0000000..b078aa3 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p10.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p11.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p11.jpg new file mode 100644 index 0000000..a50acaa Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p11.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p2.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p2.jpg new file mode 100644 index 0000000..4dc7e79 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p2.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p3.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p3.jpg new file mode 100644 index 0000000..3036a16 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p3.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p4.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p4.jpg new file mode 100644 index 0000000..a4fba88 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p4.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p5.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p5.jpg new file mode 100644 index 0000000..d620094 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p5.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p6.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p6.jpg new file mode 100644 index 0000000..ea32c45 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p6.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p7.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p7.jpg new file mode 100644 index 0000000..6fd1e05 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p7.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p8.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p8.jpg new file mode 100644 index 0000000..4c9ed28 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p8.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p9.jpg b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p9.jpg new file mode 100644 index 0000000..184b0e1 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xhdpi/p9.jpg differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi-v11/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi-v11/ic_email.png new file mode 100644 index 0000000..6608fa7 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi-v11/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi-v9/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi-v9/ic_email.png new file mode 100644 index 0000000..f133814 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi-v9/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_about.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_about.png new file mode 100644 index 0000000..78df024 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_about.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_email.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_email.png new file mode 100644 index 0000000..3377f3f Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_email.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_facebook.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_facebook.png new file mode 100644 index 0000000..026f27b Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_facebook.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..99e1482 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_social.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_social.png new file mode 100644 index 0000000..334fa3e Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_social.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_twitter.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_twitter.png new file mode 100644 index 0000000..e9b3f97 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_twitter.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_update.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_update.png new file mode 100644 index 0000000..e39af74 Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_update.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_website.png b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_website.png new file mode 100644 index 0000000..019312d Binary files /dev/null and b/MHSEvents-Project/FBLA2015/app/src/main/res/drawable-xxhdpi/ic_website.png differ diff --git a/MHSEvents-Project/FBLA2015/app/src/main/res/layout-land/activity_event_dummy.xml b/MHSEvents-Project/FBLA2015/app/src/main/res/layout-land/activity_event_dummy.xml new file mode 100644 index 0000000..938b698 --- /dev/null +++ b/MHSEvents-Project/FBLA2015/app/src/main/res/layout-land/activity_event_dummy.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + +