From 47e05547346fee3537d95be90f49ade6d963c4da Mon Sep 17 00:00:00 2001 From: cpollett Date: Wed, 24 Sep 2014 14:14:20 -0700 Subject: [PATCH 01/93] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1374f1f..1237cb7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ Cinequest-Android ================= -Cinequest Android Application for CS175 Class, Fall 2013 @ SJSU. +Cinequest Android Application for CS175 Class, Fall 2014 @ SJSU. From 2a58116d4e503ca14b0c66381ed4aede1d07dbe8 Mon Sep 17 00:00:00 2001 From: Mark Odell Date: Tue, 30 Sep 2014 15:29:48 -0700 Subject: [PATCH 02/93] Added our names --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 1237cb7..c0be01e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ Cinequest-Android ================= +###Contributors +John Miller +Nabil Amiri +Mark Odell + Cinequest Android Application for CS175 Class, Fall 2014 @ SJSU. From 7b16a0da47be4933fc24a0dd18ec28bee4fef2d3 Mon Sep 17 00:00:00 2001 From: nabilamiri Date: Tue, 30 Sep 2014 15:44:21 -0700 Subject: [PATCH 03/93] new file i created a new file --- hello.rtf | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 hello.rtf diff --git a/hello.rtf b/hello.rtf new file mode 100644 index 0000000..8b35f56 --- /dev/null +++ b/hello.rtf @@ -0,0 +1,7 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww10800\viewh8400\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural + +\f0\fs24 \cf0 helloworld} \ No newline at end of file From 9796e79522996243fdf875f7960c14f0a0ab1f1e Mon Sep 17 00:00:00 2001 From: hongde88 Date: Wed, 8 Oct 2014 23:46:24 -0700 Subject: [PATCH 04/93] Document SeparatedListAdapter.java Documented SeparatedListAdapter and updated a new link to the article of separating list adapter. --- .../sjsu/cinequest/SeparatedListAdapter.java | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/Android/src/edu/sjsu/cinequest/SeparatedListAdapter.java b/Android/src/edu/sjsu/cinequest/SeparatedListAdapter.java index 1f789ae..0609303 100644 --- a/Android/src/edu/sjsu/cinequest/SeparatedListAdapter.java +++ b/Android/src/edu/sjsu/cinequest/SeparatedListAdapter.java @@ -1,6 +1,8 @@ package edu.sjsu.cinequest; // http://blogingtutorials.blogspot.com/2010/09/separating-lists-with-headers-in.html +// http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ +// just added the second link that has the same content as the first link, but it shows the image of separating lists with headers. import java.util.LinkedHashMap; import java.util.Map; @@ -14,8 +16,11 @@ import android.widget.BaseAdapter; import edu.sjsu.cinequest.comm.cinequestitem.Schedule; +/* + * A separating list adapter with headers that can be used in listview. + */ public class SeparatedListAdapter extends BaseAdapter { - public final Map sections = new LinkedHashMap(); + public final Map sections = new LinkedHashMap(); public final ArrayAdapter headers; public Vector list; public final static int TYPE_SECTION_HEADER = 0; @@ -33,7 +38,10 @@ public void addSection(String section, Adapter adapter) { this.sections.put(section, adapter); } - + /* + * Get the number of items in the data set represented by this adapter. + * @return the number of all sections in listview. + */ public int getCount() { // total together all sections, plus one for each section header int total = 0; @@ -41,7 +49,10 @@ public int getCount() { total += adapter.getCount() + 1; return total; } - + + /* + * Get the data item associated with the specified position in the data set + */ public Object getItem(int position) { //If the list is used to store the sections, return from it if(list != null){ @@ -66,6 +77,9 @@ public Object getItem(int position) { } + /* + * Get the number of types of views that will be created by getView(). + */ public int getViewTypeCount() { // assume that headers count as one, then total all sections int total = 1; @@ -74,6 +88,9 @@ public int getViewTypeCount() { return total; } + /* + * Get the type of View that will be created by getView(). + */ public int getItemViewType(int position) { int type = 1; for(Object section : this.sections.keySet()) { @@ -90,15 +107,24 @@ public int getItemViewType(int position) { } return -1; } - + + /* + * Indicates whether all the items in this adapter are selectable. + */ public boolean areAllItemsSelectable() { return false; } - + + /* + * Indicates whether the item at the specified position is enabled. + */ public boolean isEnabled(int position) { return (getItemViewType(position) != TYPE_SECTION_HEADER); } + /* + * Get the row id associated with the specified position in the list. + */ public long getItemId(int position) { return position; } @@ -112,6 +138,10 @@ public long getItemId(int position) { super.getView(view,context,cursor); } */ + + /* + * Get a view that displays the data at the specified position in the data set. + */ public View getView(int position, View convertView, ViewGroup parent) { /* CheckBox checker = (CheckBox)convertView.findViewById(R.id.CheckBox); From df8c26ae032694036a2fe636d5c68c01f4531e8f Mon Sep 17 00:00:00 2001 From: Mark Odell Date: Thu, 9 Oct 2014 17:34:48 -0700 Subject: [PATCH 05/93] Added some documentaion to the FileCache.java file --- .../edu/sjsu/cinequest/imageutils/FileCache.java | 16 ++++++++++++++++ hello.rtf | 7 ------- 2 files changed, 16 insertions(+), 7 deletions(-) delete mode 100644 hello.rtf diff --git a/Android/src/edu/sjsu/cinequest/imageutils/FileCache.java b/Android/src/edu/sjsu/cinequest/imageutils/FileCache.java index 38f7333..3b66756 100644 --- a/Android/src/edu/sjsu/cinequest/imageutils/FileCache.java +++ b/Android/src/edu/sjsu/cinequest/imageutils/FileCache.java @@ -3,10 +3,17 @@ import java.io.File; import android.content.Context; +/* + Implements a simple file cache +*/ public class FileCache { private File cacheDir; + /** + * Constructs a new cache object and directory + * @param context The android context we are running the application on. + */ public FileCache(Context context){ //Find the dir to save cached images if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) @@ -17,6 +24,12 @@ public FileCache(Context context){ cacheDir.mkdirs(); } + /** + * Creates a File object from the cache directory + * and identifies it with a hashcode + * @param url A path to a file + * @return a new File from the cache + */ public File getFile(String url){ //I identify images by hashcode. Not a perfect solution, good for the demo. String filename=String.valueOf(url.hashCode()); @@ -27,6 +40,9 @@ public File getFile(String url){ } + /** + * Removes all files in the cache if there is any + */ public void clear(){ File[] files=cacheDir.listFiles(); if(files==null) diff --git a/hello.rtf b/hello.rtf deleted file mode 100644 index 8b35f56..0000000 --- a/hello.rtf +++ /dev/null @@ -1,7 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww10800\viewh8400\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural - -\f0\fs24 \cf0 helloworld} \ No newline at end of file From 92e648eb18e185a3bf172f197ced723f6c45ff1d Mon Sep 17 00:00:00 2001 From: johnsmiller Date: Thu, 9 Oct 2014 18:05:37 -0700 Subject: [PATCH 06/93] Add class & method documentation --- .../cinequest/ProgressMonitorCallback.java | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Android/src/edu/sjsu/cinequest/ProgressMonitorCallback.java b/Android/src/edu/sjsu/cinequest/ProgressMonitorCallback.java index 3c96d99..8d5cfbf 100644 --- a/Android/src/edu/sjsu/cinequest/ProgressMonitorCallback.java +++ b/Android/src/edu/sjsu/cinequest/ProgressMonitorCallback.java @@ -6,26 +6,48 @@ import edu.sjsu.cinequest.comm.CallbackException; import edu.sjsu.cinequest.comm.Platform; +/** + * Callback implementation for the Cinequest App + */ + public class ProgressMonitorCallback implements Callback { private ProgressDialog dialog; private Context context; private String message; + /** + * Calls second constructor method, which sets private variables + * to context and "Fetching data" + * @param context + */ public ProgressMonitorCallback(Context context) { this(context, "Fetching Data"); } - + + /** + * Main constructor. Sets private variables context and message + * with input parameters + * @param context variable to be used in class methods + * @param message message to be displayed in class methods + */ public ProgressMonitorCallback(Context context, String message) { this.context = context; this.message = message; } - + + /** + * Displays information dialog. Called on start up + */ @Override public void starting() { if (dialog == null) dialog = ProgressDialog.show(context, "Cinequest", message); } + /** + * Dismisses dialog (if not null) + * @param result unused input + */ @Override public void invoke(Object result) { if (dialog != null) @@ -33,6 +55,12 @@ public void invoke(Object result) { dialog = null; } + /** + * Called if failure encountered. + * Throwable t is converted to message and displayed using a dialog + * prompt + * @param t the thrown error/exception to be shown to the user + */ @Override public void failure(Throwable t) { if (dialog != null) From 3476e7439c4ede7ad725c5066dfd51cd43c442e4 Mon Sep 17 00:00:00 2001 From: nabilamiri Date: Thu, 9 Oct 2014 18:25:31 -0700 Subject: [PATCH 07/93] LazyAdapter comments/documentation Added comments to LazyAdapter.java --- Android/src/edu/sjsu/cinequest/LazyAdapter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Android/src/edu/sjsu/cinequest/LazyAdapter.java b/Android/src/edu/sjsu/cinequest/LazyAdapter.java index 2fca91f..83e51d7 100644 --- a/Android/src/edu/sjsu/cinequest/LazyAdapter.java +++ b/Android/src/edu/sjsu/cinequest/LazyAdapter.java @@ -34,26 +34,32 @@ public LazyAdapter(Activity a, String[] d, List news) { imageLoader=new ImageLoader(activity.getApplicationContext()); } + //returns the length of the String array data public int getCount() { return data.length; } + //returns the position of a particular element public Object getItem(int position) { return position; } + //returns the associated Item ID of a particular element public long getItemId(int position) { return position; } public View getView(final int position, View convertView, ViewGroup parent) { View vi=convertView; + //if the passed convertView doesn't exist, this will create a new instance if(convertView==null) vi = inflater.inflate(R.layout.row_listview_item, null); + //Generate the correct Views for the activity TextView text=(TextView)vi.findViewById(R.id.text);; ImageView image=(ImageView)vi.findViewById(R.id.image); text.setText(news.get(position).getName()); + //loads an image from the requested location imageLoader.DisplayImage(data[position], image); return vi; } From 541d2e53a5737318964d26383f7b67b769a9902d Mon Sep 17 00:00:00 2001 From: Mark Odell Date: Fri, 10 Oct 2014 17:41:38 -0700 Subject: [PATCH 08/93] Changed comments to JavaDoc type comments. --- Android/src/edu/sjsu/cinequest/LazyAdapter.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Android/src/edu/sjsu/cinequest/LazyAdapter.java b/Android/src/edu/sjsu/cinequest/LazyAdapter.java index 83e51d7..2b5066f 100644 --- a/Android/src/edu/sjsu/cinequest/LazyAdapter.java +++ b/Android/src/edu/sjsu/cinequest/LazyAdapter.java @@ -34,21 +34,30 @@ public LazyAdapter(Activity a, String[] d, List news) { imageLoader=new ImageLoader(activity.getApplicationContext()); } - //returns the length of the String array data + /** + * @return the length of the String array data + */ public int getCount() { return data.length; } - //returns the position of a particular element + /** + * @return the position of a particular element + */ public Object getItem(int position) { return position; } - //returns the associated Item ID of a particular element + /** + * @return the associated Item ID of a particular element + */ public long getItemId(int position) { return position; } + /** + * @return a converts a View into TextView and an ImageView a specified location + */ public View getView(final int position, View convertView, ViewGroup parent) { View vi=convertView; //if the passed convertView doesn't exist, this will create a new instance From 80ff8b2de595e8e51f281d3955ac9d11bdf34c0e Mon Sep 17 00:00:00 2001 From: Katharine Brinker Date: Fri, 10 Oct 2014 22:15:32 -0700 Subject: [PATCH 09/93] Cleaned up some code and added some javadoc --- .../edu/sjsu/cinequest/CinequestActivity.java | 69 +++++++------------ 1 file changed, 23 insertions(+), 46 deletions(-) diff --git a/Android/src/edu/sjsu/cinequest/CinequestActivity.java b/Android/src/edu/sjsu/cinequest/CinequestActivity.java index 9e26143..25d6f86 100644 --- a/Android/src/edu/sjsu/cinequest/CinequestActivity.java +++ b/Android/src/edu/sjsu/cinequest/CinequestActivity.java @@ -34,9 +34,9 @@ import edu.sjsu.cinequest.comm.cinequestitem.CommonItem; import edu.sjsu.cinequest.comm.cinequestitem.Schedule; -/* - * This superclass has convenience methods for making lists of schedules and - * filmlets. +/** + This superclass has convenience methods for making lists of schedules and + filmlets. */ public class CinequestActivity extends Activity { @@ -47,8 +47,8 @@ public class CinequestActivity extends Activity public static String m_selectedCalendarId = "Cinequest Calendar"; /** - * Launches the FilmDetail activity for the given object. - * @param result Object; Can be Schedule, Filmlet etc + Launches the FilmDetail activity for the given object. + @param result Object; Can be Schedule, Filmlet etc */ protected void launchFilmDetail(Object result) { Intent intent = new Intent(); @@ -58,42 +58,10 @@ protected void launchFilmDetail(Object result) { } /** - * Creates a list of schedules - * @param listItems the list items - * @param isChecked a function to determine when to check a checkbox, or null for no checkboxes - * @param listener the listener for checkboxes, or null for no checkboxes - * @return the list adapter + Creates a list of schedules + @param listItems the list items + @return the list adapter */ - - /*protected ListAdapter createScheduleList(List listItems) { - if (listItems.size() == 0) { - return new SeparatedListAdapter(this); - } - SeparatedListIndexedAdapter adapter = new SeparatedListIndexedAdapter(this); - - - TreeMap> filmsMap - = new TreeMap>(); - - for(Schedule s : listItems) { - String day = s.getStartTime().substring(0, 10); - - if (!filmsMap.containsKey(day)) - filmsMap.put(day, new ArrayList()); - filmsMap.get(day).add(s); - } - - DateUtils du = new DateUtils(); - for (String day : filmsMap.keySet()) { - ArrayList filmsForDay = filmsMap.get(day); - String header = du.format(day, DateUtils.DATE_DEFAULT); - String key = du.format(day, DateUtils.DAY_ONLY); - adapter.addSection(header, key, new ScheduleListAdapter(this, filmsForDay)); - } - return adapter; - } - */ - //protected ListAdapter createFilmletList(List listItems) { protected ListAdapter createFilmletList(List listItems) { if (listItems.size() == 0) { return new SeparatedListAdapter(this); @@ -119,6 +87,12 @@ protected ListAdapter createFilmletList(List listItems) { return adapter; } + /** + A method to get the first (relevant) letter of a title + @param title The title of the film + @param previousInitial the previous inititla + @return The initial of the movie title + */ private static String getTitleInitial(String title, String previousInitial) { String ucTitle = title.toUpperCase(); if (ucTitle.startsWith("A ") || ucTitle.startsWith("AN ") || ucTitle.startsWith("THE ")) @@ -128,10 +102,11 @@ private static String getTitleInitial(String title, String previousInitial) { return initial; } + /** - * An adapter for a list of schedule items. These lists occur (1) in the Films tab - * (when sorted by date), Events and Forums tabs, (2) in each film detail, - * and (3) in the Schedule tab. + An adapter for a list of schedule items. These lists occur (1) in the Films tab + (when sorted by date), Events and Forums tabs, (2) in each film detail, + and (3) in the Schedule tab. */ protected class ScheduleListAdapter extends ArrayAdapter { private static final int RESOURCE_ID = R.layout.listitem_titletimevenue; @@ -153,7 +128,6 @@ public View getView(int position, View v, ViewGroup parent) { TextView title = (TextView) v.findViewById(R.id.titletext); TextView time = (TextView) v.findViewById(R.id.timetext); TextView venue = (TextView) v.findViewById(R.id.venuetext); - //CheckBox checkbox = (CheckBox) v.findViewById(R.id.myschedule_checkbox); Button button = (Button) v.findViewById(R.id.myschedule_checkbox); final Schedule result = getItem(position); title.setText(result.getTitle()); @@ -193,12 +167,15 @@ public void onClick(View v) { } /** - * Override to change the formatting of the contents + Override to change the formatting of the contents */ protected void formatContents(View v, TextView title, TextView time, TextView venue, DateUtils du, Schedule result) { } //Calendar code for adding/removing events from Device Calendar + /** + Add or remove events from Device Calendar + */ protected void configureCalendarIcon(View v, final Button button, Schedule result) { button.setVisibility(View.VISIBLE); @@ -216,7 +193,7 @@ protected void configureCalendarIcon(View v, final Button button, Schedule resul startDate = (Date) formatter.parse(s.getStartTime()); endDate = (Date) formatter.parse(s.getEndTime()); } catch (ParseException e) { - // TODO Auto-generated catch block + e.printStackTrace(); } long begin = startDate.getTime(); From 5ed020d64445a2f91f64a83e6c536e2ea8e18077 Mon Sep 17 00:00:00 2001 From: Bruno Fernandes Lopes Date: Fri, 10 Oct 2014 23:01:49 -0700 Subject: [PATCH 10/93] Commented on some classes. --- Android/src/edu/sjsu/cinequest/DialogPrompt.java | 2 +- Android/src/edu/sjsu/cinequest/FilmDetail.java | 2 ++ Android/src/edu/sjsu/cinequest/FilmsActivity1.java | 10 ++++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Android/src/edu/sjsu/cinequest/DialogPrompt.java b/Android/src/edu/sjsu/cinequest/DialogPrompt.java index 23fa106..481b97f 100644 --- a/Android/src/edu/sjsu/cinequest/DialogPrompt.java +++ b/Android/src/edu/sjsu/cinequest/DialogPrompt.java @@ -14,7 +14,7 @@ import android.widget.Toast; /** - * The class with static methods to show varios classes of dialogs + * The class with static methods to show various classes of dialogs * @author Prabhjeet Ghuman * */ diff --git a/Android/src/edu/sjsu/cinequest/FilmDetail.java b/Android/src/edu/sjsu/cinequest/FilmDetail.java index bd98d78..53c4673 100644 --- a/Android/src/edu/sjsu/cinequest/FilmDetail.java +++ b/Android/src/edu/sjsu/cinequest/FilmDetail.java @@ -81,6 +81,7 @@ public void onClick(View v) { gmailButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { + //Share information about movies through mailing sendEmail(); } }); @@ -97,6 +98,7 @@ public void onClick(View v) { youtubeButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { + // Search on youtube videos about the film checkOnYoutube(); } }); diff --git a/Android/src/edu/sjsu/cinequest/FilmsActivity1.java b/Android/src/edu/sjsu/cinequest/FilmsActivity1.java index ee62e1b..0abea6e 100644 --- a/Android/src/edu/sjsu/cinequest/FilmsActivity1.java +++ b/Android/src/edu/sjsu/cinequest/FilmsActivity1.java @@ -51,7 +51,8 @@ public void onResume(){ @Override protected void fetchServerData() { if(isByDate()) { - if (tab.equalsIgnoreCase("films")){ + if (tab.equalsIgnoreCase("films")){ + //Get Filmes by date from server HomeActivity.getQueryManager().getFilmsByDate(target, new ProgressMonitorCallback(this) { @Override public void invoke(Object result) { @@ -62,6 +63,7 @@ public void invoke(Object result) { }); } else if(tab.equalsIgnoreCase("events")){ + //Get Events by date from server HomeActivity.getQueryManager().getEventsByDate(target, new ProgressMonitorCallback(this) { @Override public void invoke(Object result) { @@ -73,6 +75,7 @@ public void invoke(Object result) { } else if(tab.equalsIgnoreCase("forums")) { + //Get Forums by date from server HomeActivity.getQueryManager().getForumsByDate(target, new ProgressMonitorCallback(this) { @Override public void invoke(Object result) { @@ -85,7 +88,8 @@ public void invoke(Object result) { } else { - if (tab.equalsIgnoreCase("films")){ + if (tab.equalsIgnoreCase("films")){ + //Get all filmes from server HomeActivity.getQueryManager().getAllFilms (new ProgressMonitorCallback(this) { public void invoke(Object result) { super.invoke(result); @@ -96,6 +100,7 @@ public void invoke(Object result) { } else if(tab.equalsIgnoreCase("events")) { + //Get all events from server HomeActivity.getQueryManager().getAllEvents (new ProgressMonitorCallback(this) { public void invoke(Object result) { super.invoke(result); @@ -106,6 +111,7 @@ public void invoke(Object result) { } else if(tab.equalsIgnoreCase("forums")) { + //Get all forums from server HomeActivity.getQueryManager().getAllForums (new ProgressMonitorCallback(this) { public void invoke(Object result) { super.invoke(result); From 8039141a83b6c6d1bf74891bf08bd45d215c5b1b Mon Sep 17 00:00:00 2001 From: System Administrator Date: Sat, 18 Oct 2014 15:50:37 -0700 Subject: [PATCH 11/93] Added comments to some undocumented classes and clarifid some classes --- Android/project.properties | 2 +- Android/src/edu/sjsu/cinequest/MainTab.java | 8 +++++++- Android/src/edu/sjsu/cinequest/ScheduleActivity.java | 5 +++++ .../src/edu/sjsu/cinequest/SplashScreenActivity.java | 11 +++++++---- .../sjsu/cinequest/android/AndroidWebConnection.java | 10 ++++++++-- JavaCommon/project.properties | 2 +- facebook/project.properties | 2 +- 7 files changed, 30 insertions(+), 10 deletions(-) diff --git a/Android/project.properties b/Android/project.properties index d6e65f7..a8f8a04 100644 --- a/Android/project.properties +++ b/Android/project.properties @@ -9,6 +9,6 @@ android.library=false # Project target. -target=android-18 +target=android-14 android.library.reference.1=../JavaCommon android.library.reference.2=../facebook diff --git a/Android/src/edu/sjsu/cinequest/MainTab.java b/Android/src/edu/sjsu/cinequest/MainTab.java index 34f6717..211bf11 100644 --- a/Android/src/edu/sjsu/cinequest/MainTab.java +++ b/Android/src/edu/sjsu/cinequest/MainTab.java @@ -4,7 +4,13 @@ import android.content.Intent; import android.os.Bundle; import android.widget.TabHost; - +/* + * Main tab is a tab that displays contents of News,Films, Events, Forums, Schedule + * to the consumer. For easy navigation and information lookup. + * This tab is th head tab from which consumer can navigate all necessary film related + * information. + * @author Dmitri Dimov + * */ public class MainTab extends TabActivity { public void onCreate(Bundle savedInstanceState) { diff --git a/Android/src/edu/sjsu/cinequest/ScheduleActivity.java b/Android/src/edu/sjsu/cinequest/ScheduleActivity.java index 8cdf1b2..b0be547 100644 --- a/Android/src/edu/sjsu/cinequest/ScheduleActivity.java +++ b/Android/src/edu/sjsu/cinequest/ScheduleActivity.java @@ -85,6 +85,11 @@ else if (arg0.getSDateInMillis() < arg1.getSDateInMillis()) } } } +/* + * Any film related events are going to be displayed with this class. + * ALlows consumer to view any film related information with ScheduleActivity class. + * @author Dmitri Dimov + * */ public class ScheduleActivity extends Activity { ListView listView; SimpleDateFormat sdf; diff --git a/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java b/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java index 9c64d22..3a89293 100644 --- a/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java +++ b/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java @@ -20,7 +20,11 @@ import edu.sjsu.cinequest.comm.Callback; import edu.sjsu.cinequest.comm.Platform; import edu.sjsu.cinequest.comm.QueryManager; - +/* + * SplashScreenActivity loads an authentication mechanism and displays all relevant features for + * registering with cinequest. + * @author Dmitri Dimov + * */ public class SplashScreenActivity extends Activity { private LoadData loadData = null; private View mLoginStatusView; @@ -32,10 +36,9 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_splash_screen); mLoginStatusView = findViewById(R.id.login_status); Platform.setInstance(new AndroidPlatform(getApplicationContext())); - loadData = new LoadData(); + loadData = new LoadData(); //There might be a problem in three lines loadData.execute((Void) null); - showProgress(true); - + showProgress(true); //progress bar shows but nothing is shown } @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) private void showProgress(final boolean show) { diff --git a/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java b/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java index 3a473e7..c3925ad 100644 --- a/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java +++ b/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java @@ -35,7 +35,10 @@ import edu.sjsu.cinequest.comm.WebConnection; // http://android-developers.blogspot.com/2011/09/androids-http-clients.html - +/* + * AndroidWebConnection connects to internet by trying different key,value to get a response. + * @author Dmitri Dimov + * */ public class AndroidWebConnection extends WebConnection { private String url; private Hashtable postData; @@ -70,7 +73,10 @@ public AndroidWebConnection(String url) throws IOException public void setPostParameters(Hashtable postData) throws IOException { this.postData = postData; } - + /* + * If there was a response, do not look for a response, continue. + * If there was no response, hit some hosts see who will respond. + * */ private void execute() throws IOException { Platform.getInstance().log("AndroidWebConnection.execute: Opening connection to " + url); diff --git a/JavaCommon/project.properties b/JavaCommon/project.properties index 6905bdf..5ca7d62 100644 --- a/JavaCommon/project.properties +++ b/JavaCommon/project.properties @@ -9,4 +9,4 @@ android.library=true # Project target. -target=android-18 +target=android-14 diff --git a/facebook/project.properties b/facebook/project.properties index 7d7d244..1d35d2d 100644 --- a/facebook/project.properties +++ b/facebook/project.properties @@ -12,4 +12,4 @@ android.library=true # Project target. -target=android-18 +target=android-14 From a69577e54af276afe217697fefc942a0a97087de Mon Sep 17 00:00:00 2001 From: System Administrator Date: Mon, 20 Oct 2014 18:35:44 -0700 Subject: [PATCH 12/93] Updated with necessary changes --- Android/project.properties | 2 +- Android/src/edu/sjsu/cinequest/MainTab.java | 1 - Android/src/edu/sjsu/cinequest/ScheduleActivity.java | 3 +-- Android/src/edu/sjsu/cinequest/SplashScreenActivity.java | 1 - .../src/edu/sjsu/cinequest/android/AndroidWebConnection.java | 1 - JavaCommon/project.properties | 2 +- .../samples/FriendPickerSample/project.properties | 2 +- .../samples/GraphApiSample/project.properties | 2 +- .../samples/HelloFacebookSample/project.properties | 2 +- .../samples/PlacePickerSample/project.properties | 2 +- .../samples/ProfilePictureSample/project.properties | 2 +- .../samples/RPSSample/project.properties | 2 +- facebook/project.properties | 2 +- 13 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Android/project.properties b/Android/project.properties index a8f8a04..bb1cbc8 100644 --- a/Android/project.properties +++ b/Android/project.properties @@ -9,6 +9,6 @@ android.library=false # Project target. -target=android-14 +target=android-20 android.library.reference.1=../JavaCommon android.library.reference.2=../facebook diff --git a/Android/src/edu/sjsu/cinequest/MainTab.java b/Android/src/edu/sjsu/cinequest/MainTab.java index 211bf11..3fe623e 100644 --- a/Android/src/edu/sjsu/cinequest/MainTab.java +++ b/Android/src/edu/sjsu/cinequest/MainTab.java @@ -9,7 +9,6 @@ * to the consumer. For easy navigation and information lookup. * This tab is th head tab from which consumer can navigate all necessary film related * information. - * @author Dmitri Dimov * */ public class MainTab extends TabActivity { diff --git a/Android/src/edu/sjsu/cinequest/ScheduleActivity.java b/Android/src/edu/sjsu/cinequest/ScheduleActivity.java index b0be547..d30ae41 100644 --- a/Android/src/edu/sjsu/cinequest/ScheduleActivity.java +++ b/Android/src/edu/sjsu/cinequest/ScheduleActivity.java @@ -87,8 +87,7 @@ else if (arg0.getSDateInMillis() < arg1.getSDateInMillis()) } /* * Any film related events are going to be displayed with this class. - * ALlows consumer to view any film related information with ScheduleActivity class. - * @author Dmitri Dimov + * Allows consumer to view any film related information with ScheduleActivity class. * */ public class ScheduleActivity extends Activity { ListView listView; diff --git a/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java b/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java index 3a89293..b454294 100644 --- a/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java +++ b/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java @@ -23,7 +23,6 @@ /* * SplashScreenActivity loads an authentication mechanism and displays all relevant features for * registering with cinequest. - * @author Dmitri Dimov * */ public class SplashScreenActivity extends Activity { private LoadData loadData = null; diff --git a/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java b/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java index c3925ad..e7ea4a5 100644 --- a/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java +++ b/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java @@ -37,7 +37,6 @@ // http://android-developers.blogspot.com/2011/09/androids-http-clients.html /* * AndroidWebConnection connects to internet by trying different key,value to get a response. - * @author Dmitri Dimov * */ public class AndroidWebConnection extends WebConnection { private String url; diff --git a/JavaCommon/project.properties b/JavaCommon/project.properties index 5ca7d62..680cbaf 100644 --- a/JavaCommon/project.properties +++ b/JavaCommon/project.properties @@ -9,4 +9,4 @@ android.library=true # Project target. -target=android-14 +target=android-20 diff --git a/Misc/facebook-android-sdk-3.5.2/samples/FriendPickerSample/project.properties b/Misc/facebook-android-sdk-3.5.2/samples/FriendPickerSample/project.properties index cee0509..71bf43e 100644 --- a/Misc/facebook-android-sdk-3.5.2/samples/FriendPickerSample/project.properties +++ b/Misc/facebook-android-sdk-3.5.2/samples/FriendPickerSample/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-8 +target=android-14 android.library.reference.1=../../facebook diff --git a/Misc/facebook-android-sdk-3.5.2/samples/GraphApiSample/project.properties b/Misc/facebook-android-sdk-3.5.2/samples/GraphApiSample/project.properties index cee0509..71bf43e 100644 --- a/Misc/facebook-android-sdk-3.5.2/samples/GraphApiSample/project.properties +++ b/Misc/facebook-android-sdk-3.5.2/samples/GraphApiSample/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-8 +target=android-14 android.library.reference.1=../../facebook diff --git a/Misc/facebook-android-sdk-3.5.2/samples/HelloFacebookSample/project.properties b/Misc/facebook-android-sdk-3.5.2/samples/HelloFacebookSample/project.properties index cee0509..71bf43e 100644 --- a/Misc/facebook-android-sdk-3.5.2/samples/HelloFacebookSample/project.properties +++ b/Misc/facebook-android-sdk-3.5.2/samples/HelloFacebookSample/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-8 +target=android-14 android.library.reference.1=../../facebook diff --git a/Misc/facebook-android-sdk-3.5.2/samples/PlacePickerSample/project.properties b/Misc/facebook-android-sdk-3.5.2/samples/PlacePickerSample/project.properties index cee0509..71bf43e 100644 --- a/Misc/facebook-android-sdk-3.5.2/samples/PlacePickerSample/project.properties +++ b/Misc/facebook-android-sdk-3.5.2/samples/PlacePickerSample/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-8 +target=android-14 android.library.reference.1=../../facebook diff --git a/Misc/facebook-android-sdk-3.5.2/samples/ProfilePictureSample/project.properties b/Misc/facebook-android-sdk-3.5.2/samples/ProfilePictureSample/project.properties index cee0509..71bf43e 100644 --- a/Misc/facebook-android-sdk-3.5.2/samples/ProfilePictureSample/project.properties +++ b/Misc/facebook-android-sdk-3.5.2/samples/ProfilePictureSample/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-8 +target=android-14 android.library.reference.1=../../facebook diff --git a/Misc/facebook-android-sdk-3.5.2/samples/RPSSample/project.properties b/Misc/facebook-android-sdk-3.5.2/samples/RPSSample/project.properties index cee0509..71bf43e 100644 --- a/Misc/facebook-android-sdk-3.5.2/samples/RPSSample/project.properties +++ b/Misc/facebook-android-sdk-3.5.2/samples/RPSSample/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-8 +target=android-14 android.library.reference.1=../../facebook diff --git a/facebook/project.properties b/facebook/project.properties index 1d35d2d..6cd1f6a 100644 --- a/facebook/project.properties +++ b/facebook/project.properties @@ -12,4 +12,4 @@ android.library=true # Project target. -target=android-14 +target=android-20 From 282fc405dd64bfe8906e469787d342e35c332cdf Mon Sep 17 00:00:00 2001 From: System Administrator Date: Mon, 20 Oct 2014 23:32:37 -0700 Subject: [PATCH 13/93] Applied Requested Changes --- Android/src/edu/sjsu/cinequest/MainTab.java | 4 ++-- Android/src/edu/sjsu/cinequest/ScheduleActivity.java | 4 ++-- Android/src/edu/sjsu/cinequest/SplashScreenActivity.java | 4 ++-- .../src/edu/sjsu/cinequest/android/AndroidPlatform.java | 2 +- .../edu/sjsu/cinequest/android/AndroidWebConnection.java | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Android/src/edu/sjsu/cinequest/MainTab.java b/Android/src/edu/sjsu/cinequest/MainTab.java index 3fe623e..d80cb29 100644 --- a/Android/src/edu/sjsu/cinequest/MainTab.java +++ b/Android/src/edu/sjsu/cinequest/MainTab.java @@ -4,12 +4,12 @@ import android.content.Intent; import android.os.Bundle; import android.widget.TabHost; -/* +/** * Main tab is a tab that displays contents of News,Films, Events, Forums, Schedule * to the consumer. For easy navigation and information lookup. * This tab is th head tab from which consumer can navigate all necessary film related * information. - * */ + */ public class MainTab extends TabActivity { public void onCreate(Bundle savedInstanceState) { diff --git a/Android/src/edu/sjsu/cinequest/ScheduleActivity.java b/Android/src/edu/sjsu/cinequest/ScheduleActivity.java index d30ae41..e5ed328 100644 --- a/Android/src/edu/sjsu/cinequest/ScheduleActivity.java +++ b/Android/src/edu/sjsu/cinequest/ScheduleActivity.java @@ -85,10 +85,10 @@ else if (arg0.getSDateInMillis() < arg1.getSDateInMillis()) } } } -/* +/** * Any film related events are going to be displayed with this class. * Allows consumer to view any film related information with ScheduleActivity class. - * */ + */ public class ScheduleActivity extends Activity { ListView listView; SimpleDateFormat sdf; diff --git a/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java b/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java index b454294..58cda25 100644 --- a/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java +++ b/Android/src/edu/sjsu/cinequest/SplashScreenActivity.java @@ -20,10 +20,10 @@ import edu.sjsu.cinequest.comm.Callback; import edu.sjsu.cinequest.comm.Platform; import edu.sjsu.cinequest.comm.QueryManager; -/* +/** * SplashScreenActivity loads an authentication mechanism and displays all relevant features for * registering with cinequest. - * */ + */ public class SplashScreenActivity extends Activity { private LoadData loadData = null; private View mLoginStatusView; diff --git a/Android/src/edu/sjsu/cinequest/android/AndroidPlatform.java b/Android/src/edu/sjsu/cinequest/android/AndroidPlatform.java index 932b3d7..2268d2a 100644 --- a/Android/src/edu/sjsu/cinequest/android/AndroidPlatform.java +++ b/Android/src/edu/sjsu/cinequest/android/AndroidPlatform.java @@ -96,7 +96,7 @@ public void parse(String url, DefaultHandler handler, Callback callback) } catch (ParserConfigurationException e) { throw new SAXException(e.toString()); } - /* + /** * Android crap--search for * http://www.google.com/search?q=android+XML+parser+8859-1 The parser * can't infer the character encoding from the xml encoding attribute, diff --git a/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java b/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java index e7ea4a5..97c4615 100644 --- a/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java +++ b/Android/src/edu/sjsu/cinequest/android/AndroidWebConnection.java @@ -35,9 +35,9 @@ import edu.sjsu.cinequest.comm.WebConnection; // http://android-developers.blogspot.com/2011/09/androids-http-clients.html -/* +/** * AndroidWebConnection connects to internet by trying different key,value to get a response. - * */ + */ public class AndroidWebConnection extends WebConnection { private String url; private Hashtable postData; @@ -72,10 +72,10 @@ public AndroidWebConnection(String url) throws IOException public void setPostParameters(Hashtable postData) throws IOException { this.postData = postData; } - /* + /** * If there was a response, do not look for a response, continue. * If there was no response, hit some hosts see who will respond. - * */ + */ private void execute() throws IOException { Platform.getInstance().log("AndroidWebConnection.execute: Opening connection to " + url); From dbc2ca978a674cec19cbe4ccd0d1d79dbdc461b3 Mon Sep 17 00:00:00 2001 From: johnsmiller Date: Tue, 21 Oct 2014 17:56:06 -0700 Subject: [PATCH 14/93] Changed 'Schedule' to 'My Cinequest' --- Android/src/edu/sjsu/cinequest/MainTab.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android/src/edu/sjsu/cinequest/MainTab.java b/Android/src/edu/sjsu/cinequest/MainTab.java index 34f6717..f305caa 100644 --- a/Android/src/edu/sjsu/cinequest/MainTab.java +++ b/Android/src/edu/sjsu/cinequest/MainTab.java @@ -40,7 +40,7 @@ public void onCreate(Bundle savedInstanceState) { tabHost.addTab(spec); intent = new Intent().setClass(this, ScheduleActivity.class); - spec = tabHost.newTabSpec("schedule").setIndicator("Schedule",getResources().getDrawable(R.drawable.schedule_icon)).setContent(intent); + spec = tabHost.newTabSpec("My Cinequest").setIndicator("My Cinequest",getResources().getDrawable(R.drawable.schedule_icon)).setContent(intent); tabHost.addTab(spec); // Default tab is the first tab. From 8444e4aea0427560c62e7f0500ffb0720585ee4d Mon Sep 17 00:00:00 2001 From: sreenidhipm Date: Thu, 23 Oct 2014 15:32:43 -0700 Subject: [PATCH 15/93] Commit for First part of Paint the App Red, Issue #11 --- Android/src/edu/sjsu/cinequest/MainTab.java | 23 ++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Android/src/edu/sjsu/cinequest/MainTab.java b/Android/src/edu/sjsu/cinequest/MainTab.java index d80cb29..ba682d4 100644 --- a/Android/src/edu/sjsu/cinequest/MainTab.java +++ b/Android/src/edu/sjsu/cinequest/MainTab.java @@ -51,5 +51,26 @@ public void onCreate(Bundle savedInstanceState) { // Default tab is the first tab. int tab = getIntent().getIntExtra("open_tab", 0); tabHost.setCurrentTab(tab); - } + + tabHost.setOnTabChangedListener(new OnTabChangeListener(){ + + @Override + public void onTabChanged(String arg0) { + // TODO Auto-generated method stub + setTabColor(tabHost); + } + + }); + setTabColor(tabHost); + } + + //Set tab color + public void setTabColor(TabHost tabHost){ + for(int i=0; i < tabHost.getTabWidget().getChildCount(); i++) + { + tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.BLACK); //inactive tabs + } + tabHost.getTabWidget().getChildAt(tabHost.getCurrentTab()).setBackgroundColor(Color.RED); //selected, active tabs + } + } From c46fb83e6ca3b716c4cb47a9b3281dbb59a15516 Mon Sep 17 00:00:00 2001 From: Chris Pollett Date: Mon, 27 Oct 2014 14:26:12 -0700 Subject: [PATCH 16/93] Add some missing imports, delete whitespace, a=chris --- Android/project.properties | 2 +- Android/src/edu/sjsu/cinequest/MainTab.java | 10 ++++++---- JavaCommon/project.properties | 2 +- facebook/project.properties | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Android/project.properties b/Android/project.properties index bb1cbc8..f2b040a 100644 --- a/Android/project.properties +++ b/Android/project.properties @@ -9,6 +9,6 @@ android.library=false # Project target. -target=android-20 +target=android-19 android.library.reference.1=../JavaCommon android.library.reference.2=../facebook diff --git a/Android/src/edu/sjsu/cinequest/MainTab.java b/Android/src/edu/sjsu/cinequest/MainTab.java index ba682d4..9c764de 100644 --- a/Android/src/edu/sjsu/cinequest/MainTab.java +++ b/Android/src/edu/sjsu/cinequest/MainTab.java @@ -1,6 +1,8 @@ package edu.sjsu.cinequest; +import android.graphics.Color; import android.app.TabActivity; +import android.widget.TabHost.OnTabChangeListener; import android.content.Intent; import android.os.Bundle; import android.widget.TabHost; @@ -12,13 +14,13 @@ */ public class MainTab extends TabActivity { - public void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Get host object from super class - TabHost tabHost = getTabHost(); + final TabHost tabHost = getTabHost(); TabHost.TabSpec spec; Intent intent; @@ -44,13 +46,13 @@ public void onCreate(Bundle savedInstanceState) { spec = tabHost.newTabSpec("forums").setIndicator("Forums",getResources().getDrawable(R.drawable.forums_icon)).setContent(intent); tabHost.addTab(spec); - intent = new Intent().setClass(this, ScheduleActivity.class); + intent = new Intent().setClass(this, ScheduleActivity.class); spec = tabHost.newTabSpec("schedule").setIndicator("Schedule",getResources().getDrawable(R.drawable.schedule_icon)).setContent(intent); tabHost.addTab(spec); // Default tab is the first tab. int tab = getIntent().getIntExtra("open_tab", 0); - tabHost.setCurrentTab(tab); + tabHost.setCurrentTab(tab); tabHost.setOnTabChangedListener(new OnTabChangeListener(){ diff --git a/JavaCommon/project.properties b/JavaCommon/project.properties index 680cbaf..c57400d 100644 --- a/JavaCommon/project.properties +++ b/JavaCommon/project.properties @@ -9,4 +9,4 @@ android.library=true # Project target. -target=android-20 +target=android-19 diff --git a/facebook/project.properties b/facebook/project.properties index 6cd1f6a..61afc8f 100644 --- a/facebook/project.properties +++ b/facebook/project.properties @@ -12,4 +12,4 @@ android.library=true # Project target. -target=android-20 +target=android-19 From f17eca9a3fa0ca0b1b515134280babab69a6ac32 Mon Sep 17 00:00:00 2001 From: Shuang Wu Date: Sat, 1 Nov 2014 18:51:26 -0700 Subject: [PATCH 17/93] issue #13 fixed --- Android/AndroidManifest.xml | 3 + Android/res/layout/index_activity_layout.xml | 60 ++++++++ .../src/edu/sjsu/cinequest/IndexActivity.java | 138 ++++++++++++++++++ Android/src/edu/sjsu/cinequest/MainTab.java | 6 +- .../edu/sjsu/cinequest/comm/QueryManager.java | 12 ++ 5 files changed, 216 insertions(+), 3 deletions(-) create mode 100644 Android/res/layout/index_activity_layout.xml create mode 100644 Android/src/edu/sjsu/cinequest/IndexActivity.java diff --git a/Android/AndroidManifest.xml b/Android/AndroidManifest.xml index f26cc50..04a3dbd 100644 --- a/Android/AndroidManifest.xml +++ b/Android/AndroidManifest.xml @@ -56,6 +56,9 @@ + \ No newline at end of file diff --git a/Android/res/layout/index_activity_layout.xml b/Android/res/layout/index_activity_layout.xml new file mode 100644 index 0000000..68e0425 --- /dev/null +++ b/Android/res/layout/index_activity_layout.xml @@ -0,0 +1,60 @@ + + + + + +