diff --git a/Youth_Connect/.gitignore b/Youth_Connect/.gitignore new file mode 100644 index 0000000..f223045 --- /dev/null +++ b/Youth_Connect/.gitignore @@ -0,0 +1,8 @@ +*.gradle +/local.properties +/.idea/* +.DS_Store +/build +/captures +*.idea +*.iml diff --git a/Youth_Connect/.idea/.name b/Youth_Connect/.idea/.name new file mode 100644 index 0000000..23e8b91 --- /dev/null +++ b/Youth_Connect/.idea/.name @@ -0,0 +1 @@ +Youth_Connect \ No newline at end of file diff --git a/Youth_Connect/.idea/compiler.xml b/Youth_Connect/.idea/compiler.xml new file mode 100644 index 0000000..217af47 --- /dev/null +++ b/Youth_Connect/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/Youth_Connect/.idea/copyright/profiles_settings.xml b/Youth_Connect/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/Youth_Connect/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Youth_Connect/.idea/encodings.xml b/Youth_Connect/.idea/encodings.xml new file mode 100644 index 0000000..e206d70 --- /dev/null +++ b/Youth_Connect/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Youth_Connect/.idea/modules.xml b/Youth_Connect/.idea/modules.xml new file mode 100644 index 0000000..5e7a443 --- /dev/null +++ b/Youth_Connect/.idea/modules.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Youth_Connect/.idea/scopes/scope_settings.xml b/Youth_Connect/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000..922003b --- /dev/null +++ b/Youth_Connect/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/Youth_Connect/app/.gitignore b/Youth_Connect/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/Youth_Connect/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/Youth_Connect/app/build.gradle b/Youth_Connect/app/build.gradle new file mode 100644 index 0000000..9fbb360 --- /dev/null +++ b/Youth_Connect/app/build.gradle @@ -0,0 +1,28 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 22 + buildToolsVersion "23.0.0 rc3" + + defaultConfig { + applicationId "nyc.c4q.youth_connect" + minSdkVersion 15 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:22.2.1' + compile 'com.squareup.okhttp:okhttp:2.4.0' + compile 'com.android.support:cardview-v7:21.0.+' + compile 'com.android.support:recyclerview-v7:21.0.+' +} diff --git a/Youth_Connect/app/libs/ormlite-android-4.48.jar b/Youth_Connect/app/libs/ormlite-android-4.48.jar new file mode 100644 index 0000000..75c2af4 Binary files /dev/null and b/Youth_Connect/app/libs/ormlite-android-4.48.jar differ diff --git a/Youth_Connect/app/libs/ormlite-core-4.48.jar b/Youth_Connect/app/libs/ormlite-core-4.48.jar new file mode 100644 index 0000000..e3e1337 Binary files /dev/null and b/Youth_Connect/app/libs/ormlite-core-4.48.jar differ diff --git a/Youth_Connect/app/proguard-rules.pro b/Youth_Connect/app/proguard-rules.pro new file mode 100644 index 0000000..f485e72 --- /dev/null +++ b/Youth_Connect/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 /Users/gsyrimis/Library/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/Youth_Connect/app/src/androidTest/java/nyc/c4q/youth_connect/ApplicationTest.java b/Youth_Connect/app/src/androidTest/java/nyc/c4q/youth_connect/ApplicationTest.java new file mode 100644 index 0000000..b7c3ca5 --- /dev/null +++ b/Youth_Connect/app/src/androidTest/java/nyc/c4q/youth_connect/ApplicationTest.java @@ -0,0 +1,13 @@ +package nyc.c4q.youth_connect; + +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/Youth_Connect/app/src/main/AndroidManifest.xml b/Youth_Connect/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..06c2ea0 --- /dev/null +++ b/Youth_Connect/app/src/main/AndroidManifest.xml @@ -0,0 +1,86 @@ + + + + + + + + + android:screenOrientation="portrait"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Youth_Connect/app/src/main/assets/Arvo-Bold.ttf b/Youth_Connect/app/src/main/assets/Arvo-Bold.ttf new file mode 100755 index 0000000..97b203e Binary files /dev/null and b/Youth_Connect/app/src/main/assets/Arvo-Bold.ttf differ diff --git a/Youth_Connect/app/src/main/assets/Arvo-BoldItalic.ttf b/Youth_Connect/app/src/main/assets/Arvo-BoldItalic.ttf new file mode 100755 index 0000000..63f146a Binary files /dev/null and b/Youth_Connect/app/src/main/assets/Arvo-BoldItalic.ttf differ diff --git a/Youth_Connect/app/src/main/assets/Arvo-Italic.ttf b/Youth_Connect/app/src/main/assets/Arvo-Italic.ttf new file mode 100755 index 0000000..506441f Binary files /dev/null and b/Youth_Connect/app/src/main/assets/Arvo-Italic.ttf differ diff --git a/Youth_Connect/app/src/main/assets/Arvo-Regular.ttf b/Youth_Connect/app/src/main/assets/Arvo-Regular.ttf new file mode 100755 index 0000000..0f09ea5 Binary files /dev/null and b/Youth_Connect/app/src/main/assets/Arvo-Regular.ttf differ diff --git a/Youth_Connect/app/src/main/assets/RobotoSlab-Bold.ttf b/Youth_Connect/app/src/main/assets/RobotoSlab-Bold.ttf new file mode 100755 index 0000000..df5d1df Binary files /dev/null and b/Youth_Connect/app/src/main/assets/RobotoSlab-Bold.ttf differ diff --git a/Youth_Connect/app/src/main/assets/RobotoSlab-Light.ttf b/Youth_Connect/app/src/main/assets/RobotoSlab-Light.ttf new file mode 100755 index 0000000..ccb99cd Binary files /dev/null and b/Youth_Connect/app/src/main/assets/RobotoSlab-Light.ttf differ diff --git a/Youth_Connect/app/src/main/assets/RobotoSlab-Regular.ttf b/Youth_Connect/app/src/main/assets/RobotoSlab-Regular.ttf new file mode 100755 index 0000000..eb52a79 Binary files /dev/null and b/Youth_Connect/app/src/main/assets/RobotoSlab-Regular.ttf differ diff --git a/Youth_Connect/app/src/main/assets/RobotoSlab-Thin.ttf b/Youth_Connect/app/src/main/assets/RobotoSlab-Thin.ttf new file mode 100755 index 0000000..fee11da Binary files /dev/null and b/Youth_Connect/app/src/main/assets/RobotoSlab-Thin.ttf differ diff --git a/Youth_Connect/app/src/main/ic_launcher-web.png b/Youth_Connect/app/src/main/ic_launcher-web.png new file mode 100644 index 0000000..9ce95a1 Binary files /dev/null and b/Youth_Connect/app/src/main/ic_launcher-web.png differ diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/BerthaAdapter.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/BerthaAdapter.java new file mode 100644 index 0000000..540a737 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/BerthaAdapter.java @@ -0,0 +1,58 @@ +package nyc.c4q.youth_connect.JSON; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.TextView; + +import java.util.List; + +import nyc.c4q.youth_connect.R; + +/** + * Created on 8/2/15. + */ +public class BerthaAdapter extends ArrayAdapter { + + public BerthaAdapter(Context context, List objects) { + super(context, 0, objects); + } + + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + + //get row data + BerthaObject currentBertha = getItem(position); +// ArrayList superpowerList = currentSuper.getSuperPowers(); + + + // create row view + if (convertView == null) { + convertView = LayoutInflater.from(getContext()).inflate(R.layout.json_single_row, parent, false); + } + + //locate row view children + TextView providerName = (TextView) convertView.findViewById(R.id.provide_name_hint); + TextView name = (TextView) convertView.findViewById(R.id.name_hint); + TextView phone = (TextView) convertView.findViewById(R.id.phone_number); + TextView web = (TextView) convertView.findViewById(R.id.website_url); + TextView city = (TextView) convertView.findViewById(R.id.city_hint); + TextView address = (TextView) convertView.findViewById(R.id.address_hint); + TextView zipcode = (TextView) convertView.findViewById(R.id.zipCode_hint); + + //assign data values to view childen + + + providerName.setText(currentBertha.getProviderName()); + name.setText(currentBertha.getName()); + phone.setText(currentBertha.getPhoneNumber()); + web.setText(currentBertha.getWebsite()); + city.setText(currentBertha.getCity()); + address.setText(currentBertha.getAddress()); + zipcode.setText(currentBertha.getZipcode()); + return convertView; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/BerthaObject.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/BerthaObject.java new file mode 100644 index 0000000..017a946 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/BerthaObject.java @@ -0,0 +1,75 @@ +package nyc.c4q.youth_connect.JSON; + +/** + * Created on 8/2/15. + */ +public class BerthaObject { + + String phoneNumber; + String website; + String name; + String providerName; + String city; + String address; + String zipcode; + + public BerthaObject() { + + } + + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public String getWebsite() { + return website; + } + + public void setWebsite(String website) { + this.website = website; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getProviderName() { + return providerName; + } + + public void setProviderName(String providerName) { + this.providerName = providerName; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getZipcode() { + return zipcode; + } + + public void setZipcode(String zipcode) { + this.zipcode = zipcode; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/CustomDialogClass.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/CustomDialogClass.java new file mode 100644 index 0000000..9d08151 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/CustomDialogClass.java @@ -0,0 +1,67 @@ +package nyc.c4q.youth_connect.JSON; + +import android.app.Activity; +import android.app.Dialog; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.view.Window; +import android.widget.Button; + +import nyc.c4q.youth_connect.R; + +/** + * Created on 8/2/15. + */ +public class CustomDialogClass extends Dialog{ + + Button web,phone; + String weburl,phoneNum; + Activity activity; + + public CustomDialogClass(Activity context) { + super(context); + this.activity=context; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + requestWindowFeature(Window.FEATURE_NO_TITLE); + setContentView(R.layout.custom_dialog); + + web = (Button) findViewById(R.id.btn_web); + Log.d("buttonGone",weburl); + if (weburl.equals("n/a")){ + Log.d("NA",weburl); + web.setVisibility(View.GONE); + }else{ + web.setVisibility(View.VISIBLE); + web.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Uri uri = Uri.parse(weburl); // missing 'http://' will cause crashed??? + Intent i = new Intent(Intent.ACTION_VIEW, uri); + activity.startActivity(i); + } + }); + } + phone = (Button) findViewById(R.id.btn_phone); + + + phone.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent i = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNum)); + activity.startActivity(i); + + } + }); + + + + + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/JSONMainActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/JSONMainActivity.java new file mode 100644 index 0000000..f9332cf --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/JSON/JSONMainActivity.java @@ -0,0 +1,159 @@ +package nyc.c4q.youth_connect.JSON; + +import android.app.Activity; +import android.os.AsyncTask; +import android.os.Bundle; +import android.view.View; +import android.widget.AdapterView; +import android.widget.Button; +import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.ListView; +import android.widget.TextView; + +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.Response; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.IOException; +import java.util.ArrayList; + +import nyc.c4q.youth_connect.R; + + +public class JSONMainActivity extends Activity { + + EditText editText; + Button button; + ListView listView; + BerthaAdapter mAdapter; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.json_activity_main); + + button = (Button) findViewById(R.id.button); + editText = (EditText) findViewById(R.id.editText); + + listView = (ListView) findViewById(R.id.listView); + + button.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + getInfo(editText.getText().toString()); + } + }); + + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + CustomDialogClass dialogClass = new CustomDialogClass(JSONMainActivity.this); + + LinearLayout root = (LinearLayout) view; + TextView phone = (TextView) root.findViewById(R.id.phone_number); + String number = phone.getText().toString().toLowerCase(); + if (number.contains("ext")) { + number = number.substring(0, number.indexOf("ext")); + dialogClass.phoneNum = number; + } else { + dialogClass.phoneNum = number; + } + + TextView website = (TextView)root.findViewById(R.id.website_url); + String weburl = website.getText().toString().toLowerCase(); + + dialogClass.weburl = weburl; + + + dialogClass.show(); + + } + }); + + } + + public void getInfo(String zipcode) { + String url = "https://searchbertha-hrd.appspot.com/_ah/api/search/v1/zipcodes/" + zipcode + "/programs?api_key=1cfac5876e10a6886b353b9b85ca6467&serviceTag=education&attributeTag=students"; + new JSONTask().execute(url); + } + + private class JSONTask extends AsyncTask> { + + + @Override + protected ArrayList doInBackground(String... params) { + + ArrayList berthaList = new ArrayList(); + + try { + OkHttpClient client = new OkHttpClient(); + Request request = new Request.Builder().url(params[0]).build(); + Response response = client.newCall(request).execute(); + String jsonString = response.body().string(); + + JSONObject object = new JSONObject(jsonString); + JSONArray programs = object.getJSONArray("programs"); + for (int i = 0; i < programs.length(); i++) { + BerthaObject currentObj = new BerthaObject(); + JSONObject mObject = programs.getJSONObject(i); + currentObj.setProviderName(mObject.getString("provider_name")); + currentObj.setName(mObject.getString("name")); + + String websiteUrl = ""; + String phoneNumber = ""; + String city = ""; + JSONArray offices = mObject.getJSONArray("offices"); + for (int f = 0; f < offices.length(); f++) { + JSONObject officeObject = offices.getJSONObject(f); + + if (officeObject.has("website_url")) { + currentObj.setWebsite(officeObject.getString("website_url")); + } else { + currentObj.setWebsite("N/A"); + } + + if (officeObject.has("phone_number")) { + currentObj.setPhoneNumber(officeObject.getString("phone_number")); + } else { + currentObj.setPhoneNumber("N/A"); + } + + currentObj.setCity(officeObject.getString("city")); + currentObj.setZipcode(officeObject.getString("postal")); + + if (officeObject.has("address1") && officeObject.has("address2")) { + currentObj.setAddress(officeObject.getString("address1") + officeObject.getString("address2")); + } else if (officeObject.has("address1")) { + currentObj.setAddress(officeObject.getString("address1")); + } else { + currentObj.setAddress(officeObject.getString("N/A")); + } + + } + berthaList.add(currentObj); + } + + } catch (IOException e) { + e.printStackTrace(); + } catch (JSONException e) { + e.printStackTrace(); + } + + return berthaList; + } + + @Override + protected void onPostExecute(ArrayList list) { + mAdapter = new BerthaAdapter(getApplicationContext(), list); + listView.setAdapter(mAdapter); + } + } + + +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/adapter/CoordinatorAdapter.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/adapter/CoordinatorAdapter.java new file mode 100644 index 0000000..47098cf --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/adapter/CoordinatorAdapter.java @@ -0,0 +1,65 @@ +package nyc.c4q.youth_connect.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.TextView; + +import com.j256.ormlite.dao.Dao; + +import java.util.List; + +import nyc.c4q.youth_connect.R; +import nyc.c4q.youth_connect.models.Coordinator; + +/** + * Created by c4q-sarahkim on 8/3/15. + */ + +public class CoordinatorAdapter extends ArrayAdapter { + + LayoutInflater li; + List coordinatorList; + Dao coordinatorDao; + + public CoordinatorAdapter(Context context, int resource, List coordinatorList, Dao coordinatorDao) { + super(context, resource, coordinatorList); + this.coordinatorList = coordinatorList; + this.coordinatorDao = coordinatorDao; + li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + } + + @Override + public int getCount() { + return coordinatorList.size(); + } + + @Override + public Coordinator getItem(int i) { + return coordinatorList.get(i); + } + + @Override + public long getItemId(int i) { + return 0; + } + + @Override + public View getView(int i, View view, ViewGroup viewGroup) { + if (view == null) { + view = li.inflate(R.layout.coordinators, viewGroup, false); + } + Coordinator coordinator = (Coordinator) coordinatorList.get(i); + ((TextView) view.findViewById(R.id.coordinator_name)).setText(coordinator.getCoordinatorName()); + ((TextView) view.findViewById(R.id.program_name)).setText(coordinator.getProgramName()); + ((TextView) view.findViewById(R.id.address1)).setText(coordinator.getAddressLine1()); + ((TextView) view.findViewById(R.id.address2)).setText(coordinator.getAddressLine2()); + ((TextView) view.findViewById(R.id.city)).setText(coordinator.getCity()); + ((TextView) view.findViewById(R.id.state)).setText(coordinator.getState()); + ((TextView) view.findViewById(R.id.zipcode)).setText(coordinator.getZipcode()); + ((TextView) view.findViewById(R.id.phone)).setText(coordinator.getPhone()); + return view; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/adapter/ParentAdapter.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/adapter/ParentAdapter.java new file mode 100644 index 0000000..755ce5d --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/adapter/ParentAdapter.java @@ -0,0 +1,66 @@ +package nyc.c4q.youth_connect.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.TextView; + +import com.j256.ormlite.dao.Dao; + +import java.util.List; + +import nyc.c4q.youth_connect.R; +import nyc.c4q.youth_connect.models.Parent; + +/** + * Created by c4q-sarahkim on 8/3/15. + */ + +public class ParentAdapter extends ArrayAdapter { + + LayoutInflater li; + List parentList; + Dao parentDao; + + public ParentAdapter(Context context, int resource, List parentList, Dao parentDao) { + super(context, resource, parentList); + this.parentList = parentList; + this.parentDao = parentDao; + li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + } + + @Override + public int getCount() { + return parentList.size(); + } + + @Override + public Parent getItem(int i) { + return parentList.get(i); + } + + @Override + public long getItemId(int i) { + return 0; + } + + @Override + public View getView(int i, View view, ViewGroup viewGroup) { + if (view == null) { + view = li.inflate(R.layout.coordinators, viewGroup, false); + } + + Parent parent = (Parent) parentList.get(i); + ((TextView) view.findViewById(R.id.coordinator_name)).setText(parent.getParentName()); + ((TextView) view.findViewById(R.id.program_name)).setText(parent.getChildName()); + ((TextView) view.findViewById(R.id.address1)).setText(parent.getAddressLine1()); + ((TextView) view.findViewById(R.id.address2)).setText(parent.getAddressLine2()); + ((TextView) view.findViewById(R.id.city)).setText(parent.getCity()); + ((TextView) view.findViewById(R.id.state)).setText(parent.getState()); + ((TextView) view.findViewById(R.id.zipcode)).setText(parent.getZipcode()); + ((TextView) view.findViewById(R.id.phone)).setText(parent.getPhone()); + return view; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/db/DatabaseHelper.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/db/DatabaseHelper.java new file mode 100644 index 0000000..2bc5108 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/db/DatabaseHelper.java @@ -0,0 +1,77 @@ +package nyc.c4q.youth_connect.db; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; + +import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; +import com.j256.ormlite.dao.Dao; +import com.j256.ormlite.support.ConnectionSource; +import com.j256.ormlite.table.TableUtils; + +import java.sql.SQLException; + +import nyc.c4q.youth_connect.models.Coordinator; +import nyc.c4q.youth_connect.models.Parent; +import nyc.c4q.youth_connect.models.Student; + +/** + * Created by c4q-sarahkim on 8/1/15. + */ + +public class DatabaseHelper extends OrmLiteSqliteOpenHelper { + + public static final String DATABASE_NAME = "kidtracker.db"; + public static final int DATABASE_VERSION = 1; + + private Dao coordinatorDao; + private Dao parentDao; + private Dao studentDao; + + public DatabaseHelper(Context context) { + super(context, DATABASE_NAME, null, DATABASE_VERSION); + } + + @Override + public void onCreate(SQLiteDatabase sqLiteDatabase, ConnectionSource connectionSource) { + try { + TableUtils.createTable(connectionSource, Coordinator.class); + TableUtils.createTable(connectionSource, Parent.class); + TableUtils.createTable(connectionSource, Student.class); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + @Override + public void onUpgrade(SQLiteDatabase sqLiteDatabase, ConnectionSource connectionSource, int i, int i2) { + try { + TableUtils.dropTable(connectionSource, Coordinator.class, true); + TableUtils.dropTable(connectionSource, Parent.class, true); + TableUtils.dropTable(connectionSource, Student.class, true); + onCreate(sqLiteDatabase, connectionSource); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + public Dao getCoordinatorDao() throws SQLException { + if (coordinatorDao == null) { + coordinatorDao = getDao(Coordinator.class); + } + return coordinatorDao; + } + + public Dao getParentDao() throws SQLException { + if (parentDao == null) { + parentDao = getDao(Parent.class); + } + return parentDao; + } + + public Dao getStudentDao() throws SQLException { + if (studentDao == null) { + studentDao = getDao(Student.class); + } + return studentDao; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Coordinator.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Coordinator.java new file mode 100644 index 0000000..e9f58c5 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Coordinator.java @@ -0,0 +1,114 @@ +package nyc.c4q.youth_connect.models; + +import com.j256.ormlite.field.DatabaseField; +import com.j256.ormlite.table.DatabaseTable; + +/** + * Created by c4q-sarahkim on 8/1/15. + */ + +@DatabaseTable(tableName = "coordinators") +public class Coordinator { + + @DatabaseField(generatedId = true, columnName = "coordinator_id") + private int coordinatorId; + + @DatabaseField (columnName = "coordinator_name") + private String coordinatorName; + + @DatabaseField (columnName = "program_name") + private String programName; + + @DatabaseField (columnName = "address_line1") + private String addressLine1; + + @DatabaseField (columnName = "address_line2") + private String addressLine2; + + @DatabaseField + private String city; + + @DatabaseField + private String state; + + @DatabaseField + private String zipcode; + + @DatabaseField + private String phone; + + public Coordinator() { + } + + public int getCoordinatorId() { + return coordinatorId; + } + + public void setCoordinatorId(int coordinatorId) { + this.coordinatorId = coordinatorId; + } + + public String getCoordinatorName() { + return coordinatorName; + } + + public void setCoordinatorName(String coordinatorName) { + this.coordinatorName = coordinatorName; + } + + public String getProgramName() { + return programName; + } + + public void setProgramName(String programName) { + this.programName = programName; + } + + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getZipcode() { + return zipcode; + } + + public void setZipcode(String zipcode) { + this.zipcode = zipcode; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Parent.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Parent.java new file mode 100644 index 0000000..32ff098 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Parent.java @@ -0,0 +1,114 @@ +package nyc.c4q.youth_connect.models; + +import com.j256.ormlite.field.DatabaseField; +import com.j256.ormlite.table.DatabaseTable; + +/** + * Created by c4q-sarahkim on 8/1/15. + */ + +@DatabaseTable(tableName = "parents") +public class Parent { + + @DatabaseField(generatedId = true, columnName = "parent_id") + private int parentId; + + @DatabaseField (columnName = "parent_name") + private String parentName; + + @DatabaseField (columnName = "child_name") + private String childName; + + @DatabaseField (columnName = "address_line1") + private String addressLine1; + + @DatabaseField (columnName = "address_line2") + private String addressLine2; + + @DatabaseField + private String city; + + @DatabaseField + private String state; + + @DatabaseField + private String zipcode; + + @DatabaseField + private String phone; + + public Parent() { + } + + public int getParentId() { + return parentId; + } + + public void setParentId(int parentId) { + this.parentId = parentId; + } + + public String getParentName() { + return parentName; + } + + public void setParentName(String parentName) { + this.parentName = parentName; + } + + public String getChildName() { + return childName; + } + + public void setChildName(String childName) { + this.childName = childName; + } + + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getZipcode() { + return zipcode; + } + + public void setZipcode(String zipcode) { + this.zipcode = zipcode; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Student.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Student.java new file mode 100644 index 0000000..074e863 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/models/Student.java @@ -0,0 +1,81 @@ +package nyc.c4q.youth_connect.models; + +import com.j256.ormlite.field.DatabaseField; +import com.j256.ormlite.table.DatabaseTable; + +/** + * Created by c4q-sarahkim on 8/1/15. + */ + +@DatabaseTable(tableName = "children") +public class Student { + + @DatabaseField(generatedId = true) + private int student_id; + + @DatabaseField + private String student_name; + + @DatabaseField + private String student_age; + + @DatabaseField + private String parent_name; + + @DatabaseField + private String coordinator_name; + + @DatabaseField + private boolean checked_in; + + public Student() { + } + + public int getStudent_id() { + return student_id; + } + + public void setStudent_id(int student_id) { + this.student_id = student_id; + } + + public String getStudent_name() { + return student_name; + } + + public void setStudent_name(String student_name) { + this.student_name = student_name; + } + + public String getStudent_age() { + return student_age; + } + + public void setStudent_age(String student_age) { + this.student_age = student_age; + } + + public String getParent_name() { + return parent_name; + } + + public void setParent_name(String parent_name) { + this.parent_name = parent_name; + } + + public String getCoordinator_name() { + return coordinator_name; + } + + public void setCoordinator_name(String coordinator_name) { + this.coordinator_name = coordinator_name; + } + + public boolean isChecked_in() { + return checked_in; + } + + public void setChecked_in(boolean checked_in) { + this.checked_in = checked_in; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/Categories.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/Categories.java new file mode 100644 index 0000000..44e0c15 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/Categories.java @@ -0,0 +1,78 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Intent; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.Button; + +import nyc.c4q.youth_connect.R; + +public class Categories extends ActionBarActivity { + + Button statisticButton; + Button nycGovButton; + Button cytButton; + Button otherLinksButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // to hide the action bar + setContentView(R.layout.ui_categories); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + statisticButton = (Button)findViewById(R.id.statistic_button); + statisticButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startStatistic(); + } + }); + + nycGovButton = (Button)findViewById(R.id.nycgov_button); + nycGovButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startNycGov(); + } + }); + + cytButton = (Button)findViewById(R.id.cyt_button); + cytButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startCyt(); + } + }); + + otherLinksButton = (Button)findViewById(R.id.links_button); + otherLinksButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startOtherLinks(); + } + }); + } + + private void startOtherLinks() { + Intent intent = new Intent(this, OtherLinks.class); + startActivity(intent); + } + + private void startCyt() { + Intent intent = new Intent(this, ChildYouthTeen.class); + startActivity(intent); + } + + private void startNycGov() { + Intent intent = new Intent(this, NycGov.class); + startActivity(intent); + } + + private void startStatistic() { + Intent intent = new Intent(this, Statistics.class); + startActivity(intent); + } + + +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ChildYouthTeen.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ChildYouthTeen.java new file mode 100644 index 0000000..ca75eff --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ChildYouthTeen.java @@ -0,0 +1,36 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.Button; + +import nyc.c4q.youth_connect.R; + +public class ChildYouthTeen extends ActionBarActivity { + + Button syepButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + //hide the action bar + setContentView(R.layout.ui_cyt); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + syepButton = (Button) findViewById(R.id.summeryouth_button); + syepButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + Uri uri = Uri.parse("http://www.nyc.gov/html/dycd/html/jobs/syep.shtml"); // missing 'http://' will cause crashed + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + } + }); + + } +} \ No newline at end of file diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/CustomButton.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/CustomButton.java new file mode 100644 index 0000000..53c4400 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/CustomButton.java @@ -0,0 +1,25 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Context; +import android.widget.Button; + +/** + * Created by c4q-joshelynvivas on 8/2/15. + */ +public class CustomButton extends Button { + boolean isSelected=false; + + public CustomButton(Context context) { + super(context); + } + + @Override + public boolean isSelected() { + return isSelected; + } + + @Override + public void setSelected(boolean isSelected) { + this.isSelected = isSelected; + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ExistingCoordinatorActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ExistingCoordinatorActivity.java new file mode 100644 index 0000000..0578b57 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ExistingCoordinatorActivity.java @@ -0,0 +1,90 @@ +package nyc.c4q.youth_connect.ui; + +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.Menu; +import android.view.MenuItem; +import android.widget.ListView; + +import com.j256.ormlite.android.apptools.OpenHelperManager; +import com.j256.ormlite.dao.Dao; + +import java.sql.SQLException; +import java.util.List; + +import nyc.c4q.youth_connect.R; +import nyc.c4q.youth_connect.adapter.CoordinatorAdapter; +import nyc.c4q.youth_connect.db.DatabaseHelper; +import nyc.c4q.youth_connect.models.Coordinator; + +public class ExistingCoordinatorActivity extends ActionBarActivity { + + private DatabaseHelper databaseHelper = null; + + private ListView coordinator_list; + + private int selectedRecordPosition = -1; + + private Dao coordinatorDao; + + private List coordinatorList; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_existing_coordinator); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + coordinator_list = (ListView) findViewById(R.id.coordinator_list); + + try { + coordinatorDao = getHelper().getCoordinatorDao(); + coordinatorList = coordinatorDao.queryForAll(); + + CoordinatorAdapter coordinatorAdapter = new CoordinatorAdapter(this, R.layout.coordinators, coordinatorList, coordinatorDao); + coordinator_list.setAdapter(coordinatorAdapter); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_existing_coordinator, menu); + return true; + } + + @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. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } + + private DatabaseHelper getHelper() { + if (databaseHelper == null) { + databaseHelper = OpenHelperManager.getHelper(this, DatabaseHelper.class); + } + return databaseHelper; + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (databaseHelper != null) { + OpenHelperManager.releaseHelper(); + databaseHelper = null; + } + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ExistingParentActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ExistingParentActivity.java new file mode 100644 index 0000000..c56bcbe --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ExistingParentActivity.java @@ -0,0 +1,90 @@ +package nyc.c4q.youth_connect.ui; + +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.Menu; +import android.view.MenuItem; +import android.widget.ListView; + +import com.j256.ormlite.android.apptools.OpenHelperManager; +import com.j256.ormlite.dao.Dao; + +import java.sql.SQLException; +import java.util.List; + +import nyc.c4q.youth_connect.R; +import nyc.c4q.youth_connect.adapter.ParentAdapter; +import nyc.c4q.youth_connect.db.DatabaseHelper; +import nyc.c4q.youth_connect.models.Parent; + +public class ExistingParentActivity extends ActionBarActivity { + + private DatabaseHelper databaseHelper = null; + + private ListView user_list; + + private int selectedRecordPosition = -1; + + private Dao parentDao; + + private List parentList; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_existing_user); + user_list = (ListView) findViewById(R.id.user_list); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + try { + parentDao = getHelper().getParentDao(); + parentList = parentDao.queryForAll(); + + ParentAdapter parentAdapter = new ParentAdapter(this, R.layout.coordinators, parentList, parentDao); + user_list.setAdapter(parentAdapter); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_existing_coordinator, menu); + return true; + } + + @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. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } + + private DatabaseHelper getHelper() { + if (databaseHelper == null) { + databaseHelper = OpenHelperManager.getHelper(this, DatabaseHelper.class); + } + return databaseHelper; + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (databaseHelper != null) { + OpenHelperManager.releaseHelper(); + databaseHelper = null; + } + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NewCoordinatorActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NewCoordinatorActivity.java new file mode 100644 index 0000000..a5bec07 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NewCoordinatorActivity.java @@ -0,0 +1,119 @@ +package nyc.c4q.youth_connect.ui; + +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import com.j256.ormlite.android.apptools.OpenHelperManager; +import com.j256.ormlite.dao.Dao; + +import java.sql.SQLException; + +import nyc.c4q.youth_connect.R; +import nyc.c4q.youth_connect.db.DatabaseHelper; +import nyc.c4q.youth_connect.models.Coordinator; + +public class NewCoordinatorActivity extends ActionBarActivity { + + private EditText edittext_coordinatorname; + private EditText edittext_programname; + private EditText edittext_addressline1; + private EditText edittext_addressline2; + private EditText edittext_city; + private EditText edittext_state; + private EditText edittext_zipcode; + private EditText edittext_phone; + private Button ui_nextbutton; + + private DatabaseHelper databaseHelper = null; + + Button nextButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // to hide the action bar + setContentView(R.layout.ui_newcoordinator_signin); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + initializeViews(); + ui_nextbutton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + if(edittext_coordinatorname.getText().toString().isEmpty() + || edittext_programname.getText().toString().isEmpty() + || edittext_addressline1.getText().toString().isEmpty() + || edittext_city.getText().toString().isEmpty() + || edittext_state.getText().toString().isEmpty() + || edittext_zipcode.getText().toString().isEmpty() + || edittext_phone.getText().toString().isEmpty()) { + Toast.makeText(getApplicationContext(), "Missing information", Toast.LENGTH_LONG).show(); + } else { + Coordinator coordinator = new Coordinator(); + coordinator.setCoordinatorName(edittext_coordinatorname.getText().toString()); + coordinator.setProgramName(edittext_programname.getText().toString()); + coordinator.setAddressLine1(edittext_addressline1.getText().toString()); + coordinator.setAddressLine2(edittext_addressline2.getText().toString()); + coordinator.setCity(edittext_city.getText().toString()); + coordinator.setState(edittext_state.getText().toString()); + coordinator.setZipcode(edittext_zipcode.getText().toString()); + coordinator.setPhone(edittext_phone.getText().toString()); + try { + Dao coordinatorDao = getHelper().getCoordinatorDao(); + coordinatorDao.create(coordinator); + resetViews(); + } catch (SQLException e) { + e.printStackTrace(); + } + } + } + }); + } + + public void initializeViews() { + edittext_coordinatorname = (EditText) findViewById(R.id.edittext_coordinatorname); + edittext_programname = (EditText) findViewById(R.id.edittext_programname); + edittext_addressline1 = (EditText) findViewById(R.id.edittext_addressline1); + edittext_addressline2 = (EditText) findViewById(R.id.edittext_addressline2); + edittext_city = (EditText) findViewById(R.id.edittext_city); + edittext_state = (EditText) findViewById(R.id.edittext_state); + edittext_zipcode = (EditText) findViewById(R.id.edittext_zipcode); + edittext_phone = (EditText) findViewById(R.id.edittext_phone); + ui_nextbutton = (Button) findViewById(R.id.ui_nextbutton); + } + + public void resetViews() { + edittext_coordinatorname.setText(""); + edittext_programname.setText(""); + edittext_addressline1.setText(""); + edittext_addressline2.setText(""); + edittext_city.setText(""); + edittext_state.setText(""); + edittext_zipcode.setText(""); + edittext_phone.setText(""); + ui_nextbutton.setText(""); + + } + + private DatabaseHelper getHelper() { + if (databaseHelper == null) { + databaseHelper = OpenHelperManager.getHelper(this, DatabaseHelper.class); + } + return databaseHelper; + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (databaseHelper != null) { + OpenHelperManager.releaseHelper(); + databaseHelper = null; + } + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NewParentActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NewParentActivity.java new file mode 100644 index 0000000..46b5b19 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NewParentActivity.java @@ -0,0 +1,114 @@ +package nyc.c4q.youth_connect.ui; + +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import com.j256.ormlite.android.apptools.OpenHelperManager; +import com.j256.ormlite.dao.Dao; + +import java.sql.SQLException; + +import nyc.c4q.youth_connect.R; +import nyc.c4q.youth_connect.db.DatabaseHelper; +import nyc.c4q.youth_connect.models.Coordinator; +import nyc.c4q.youth_connect.models.Parent; + +public class NewParentActivity extends ActionBarActivity { + + private EditText edittext_parentname; + private EditText edittext_childname; + private EditText edittext_addressline1; + private EditText edittext_addressline2; + private EditText edittext_city; + private EditText edittext_state; + private EditText edittext_zipcode; + private EditText edittext_phone; + private Button ui_nextbutton; + + private DatabaseHelper databaseHelper = null; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.ui_newuserstudent_signin); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + initializeViews(); + ui_nextbutton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + if(edittext_parentname.getText().toString().isEmpty() + || edittext_childname.getText().toString().isEmpty() + || edittext_addressline1.getText().toString().isEmpty() + || edittext_city.getText().toString().isEmpty() + || edittext_state.getText().toString().isEmpty() + || edittext_zipcode.getText().toString().isEmpty() + || edittext_phone.getText().toString().isEmpty()) { + Toast.makeText(getApplicationContext(), "Missing information", Toast.LENGTH_LONG).show(); + } else { + Parent parent = new Parent(); + parent.setParentName(edittext_parentname.getText().toString()); + parent.setChildName(edittext_childname.getText().toString()); + parent.setAddressLine1(edittext_addressline1.getText().toString()); + parent.setAddressLine2(edittext_addressline2.getText().toString()); + parent.setCity(edittext_city.getText().toString()); + parent.setState(edittext_state.getText().toString()); + parent.setZipcode(edittext_zipcode.getText().toString()); + parent.setPhone(edittext_phone.getText().toString()); + try { + Dao parentDao = getHelper().getParentDao(); + parentDao.create(parent); + resetViews(); + } catch (SQLException e) { + e.printStackTrace(); + } + } + } + }); + } + + public void initializeViews() { + edittext_parentname = (EditText) findViewById(R.id.edittext_parentname); + edittext_childname = (EditText) findViewById(R.id.edittext_childname); + edittext_addressline1 = (EditText) findViewById(R.id.edittext_addressline1); + edittext_addressline2 = (EditText) findViewById(R.id.edittext_addressline2); + edittext_city = (EditText) findViewById(R.id.edittext_city); + edittext_state = (EditText) findViewById(R.id.edittext_state); + edittext_zipcode = (EditText) findViewById(R.id.edittext_zipcode); + edittext_phone = (EditText) findViewById(R.id.edittext_phone); + ui_nextbutton = (Button) findViewById(R.id.ui_nextbutton); + } + + public void resetViews() { + edittext_parentname.setText(""); + edittext_childname.setText(""); + edittext_addressline1.setText(""); + edittext_addressline2.setText(""); + edittext_city.setText(""); + edittext_state.setText(""); + edittext_zipcode.setText(""); + edittext_phone.setText(""); + ui_nextbutton.setText(""); + } + + private DatabaseHelper getHelper() { + if (databaseHelper == null) { + databaseHelper = OpenHelperManager.getHelper(this, DatabaseHelper.class); + } + return databaseHelper; + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (databaseHelper != null) { + OpenHelperManager.releaseHelper(); + databaseHelper = null; + } + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NycGov.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NycGov.java new file mode 100644 index 0000000..a5aec59 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/NycGov.java @@ -0,0 +1,58 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.Button; + +import nyc.c4q.youth_connect.R; + +public class NycGov extends ActionBarActivity { + Button educationButton; + Button dycdButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + //hide the action bar + setContentView(R.layout.ui_nycgov); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + educationButton = (Button)findViewById(R.id.education_button); + educationButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startEducation(); + + } + }); + + dycdButton = (Button)findViewById(R.id.dycd_button); + dycdButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startDycd(); + + } + }); + + + } + + private void startDycd() { + Uri uri = Uri.parse("http://www.nyc.gov/html/dycd/html/home/home.shtml"); // missing 'http://' will cause crashed + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + } + + private void startEducation() { + Uri uri = Uri.parse("http://schools.nyc.gov/default.htm"); // missing 'http://' will cause crashed + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + } + + +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/OtherLinks.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/OtherLinks.java new file mode 100644 index 0000000..1cbbba6 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/OtherLinks.java @@ -0,0 +1,60 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.Button; + +import nyc.c4q.youth_connect.R; + +public class OtherLinks extends ActionBarActivity { + + Button qchButton; + Button sonycButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + //hide the action bar + setContentView(R.layout.ui_otherlinks); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + qchButton = (Button)findViewById(R.id.qch_button); + qchButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startQch(); + + } + }); + + sonycButton = (Button)findViewById(R.id.sonyc_button); + sonycButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startSonyc(); + + } + }); + + + } + + private void startQch() { + Uri uri = Uri.parse("https://qchnyc.wordpress.com/"); // missing 'http://' will cause crashed + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + } + + private void startSonyc() { + Uri uri = Uri.parse("http://www.nyc.gov/html/dycd/html/afterschool/SONYC_1.shtml"); // missing 'http://' will cause crashed + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + } + + + +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ProviderActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ProviderActivity.java new file mode 100644 index 0000000..7d49564 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/ProviderActivity.java @@ -0,0 +1,78 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Intent; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.MenuItem; +import android.view.View; +import android.widget.Button; + +import nyc.c4q.youth_connect.R; + +public class ProviderActivity extends ActionBarActivity { + + Button createCoordinatorButton; + Button existingCoordinatorButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // to hide the action bar + setContentView(R.layout.ui_provider_page); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + createCoordinatorButton = (Button)findViewById(R.id.uimain_newcoordinator); + createCoordinatorButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startNewUser(); + + } + }); + + existingCoordinatorButton = (Button)findViewById(R.id.uimain_existingcoordinator); + existingCoordinatorButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { +// LayoutInflater inflater = getLayoutInflater(); +// View layout = inflater.inflate(R.layout.toast_layout, +// (ViewGroup) findViewById(R.id.toast_layout_root)); +// +// TextView text = (TextView) layout.findViewById(R.id.text); +// text.setText("Coming Soon to Communities Near You"); +// +// Toast toast = new Toast(getApplicationContext()); +// toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0); +// toast.setDuration(Toast.LENGTH_SHORT); +// toast.setView(layout); +// toast.show(); + Intent intent = new Intent(getApplicationContext(), ExistingCoordinatorActivity.class); + startActivity(intent); + + } + }); + + } + + private void startNewUser() { + Intent intent = new Intent(this, NewCoordinatorActivity.class); + startActivity(intent); + } + + + @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. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/RegistrationActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/RegistrationActivity.java new file mode 100644 index 0000000..f5ee702 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/RegistrationActivity.java @@ -0,0 +1,70 @@ +package nyc.c4q.youth_connect.ui; + +import android.support.v7.app.ActionBarActivity; +import android.os.Bundle; +import android.telephony.PhoneNumberFormattingTextWatcher; +import android.text.InputType; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.RadioButton; + +import nyc.c4q.youth_connect.R; + +public class RegistrationActivity extends ActionBarActivity { + + private RadioButton radio_parents, radio_coordinators; + private LinearLayout registration_form; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_registration); + radio_parents = (RadioButton) findViewById(R.id.radio_parents); + radio_coordinators = (RadioButton) findViewById(R.id.radio_coordinators); + registration_form = (LinearLayout) findViewById(R.id.registration_form); + } + + public void onRadioButtonClicked(View view) { + boolean checked = ((RadioButton) view).isChecked(); + + switch(view.getId()) { + case R.id.radio_parents: + if (checked) { + registration_form.removeAllViews(); + registration_form.inflate(this, R.layout.ui_newuserstudent_signin, registration_form); + } + break; + case R.id.radio_coordinators: + if (checked) { + registration_form.removeAllViews(); + registration_form.inflate(this, R.layout.ui_newcoordinator_signin, registration_form); + } + break; + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.menu_registration, menu); + return true; + } + + @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. + int id = item.getItemId(); + + //noinspection SimplifiableIfStatement + if (id == R.id.action_settings) { + return true; + } + + return super.onOptionsItemSelected(item); + } +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/Statistics.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/Statistics.java new file mode 100644 index 0000000..29e23ff --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/Statistics.java @@ -0,0 +1,44 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.Button; + +import nyc.c4q.youth_connect.R; + +public class Statistics extends ActionBarActivity { + + Button doSomething; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + //hide the action bar + setContentView(R.layout.ui_statistics); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + doSomething = (Button)findViewById(R.id.dosomething_facts); + doSomething.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + Uri uri = Uri.parse("https://www.dosomething.org/facts/11-facts-about-homeless-teens"); // missing 'http://' will cause crashed + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + } + }); + + + + + + + + } + + +} diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/UIMainActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/UIMainActivity.java new file mode 100644 index 0000000..13901b3 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/UIMainActivity.java @@ -0,0 +1,57 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Intent; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.View; +import android.widget.Button; + +import nyc.c4q.youth_connect.R; + +public class UIMainActivity extends ActionBarActivity { + Button buttonMainUser; + Button buttonMainProvider; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // to hide the action bar + setContentView(R.layout.ui_activity_main); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + buttonMainUser = (Button)findViewById(R.id.uimain_user); + buttonMainUser.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startUser(); + + } + }); + + buttonMainProvider = (Button)findViewById(R.id.uimain_coordinator); + buttonMainProvider.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startProvider(); + + } + }); +} + + private void startProvider() { + Intent intent = new Intent(this, ProviderActivity.class); + startActivity(intent); + + } + + private void startUser() { + Intent intent = new Intent(this, UserActivity.class); + startActivity(intent); + + } + + +} + + diff --git a/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/UserActivity.java b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/UserActivity.java new file mode 100644 index 0000000..13f3a61 --- /dev/null +++ b/Youth_Connect/app/src/main/java/nyc/c4q/youth_connect/ui/UserActivity.java @@ -0,0 +1,106 @@ +package nyc.c4q.youth_connect.ui; + +import android.content.Intent; +import android.os.Bundle; +import android.support.v7.app.ActionBar; +import android.support.v7.app.ActionBarActivity; +import android.view.Gravity; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; +import android.widget.TextView; +import android.widget.Toast; + +import nyc.c4q.youth_connect.JSON.JSONMainActivity; +import nyc.c4q.youth_connect.R; + +public class UserActivity extends ActionBarActivity { + + private Button uiuser_youthfacts; + private Button uiuser_youthprogram; + private Button uiuser_checkin; + private Button uiuser_newuser; + private Button uiuser_existinguser; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // to hide the action bar + setContentView(R.layout.ui_user_page); + ActionBar actionBar = getSupportActionBar(); + actionBar.hide(); + + uiuser_youthfacts = (Button)findViewById(R.id.uiuser_youthfacts); + uiuser_youthfacts.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startCategories(); + + } + }); + + uiuser_youthprogram = (Button)findViewById(R.id.uiuser_youthprogram); + uiuser_youthprogram.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + startSearch(); + + } + }); + + uiuser_newuser = (Button)findViewById(R.id.uiuser_newuser); + uiuser_newuser.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startNewUser(); + } + }); + + uiuser_existinguser = (Button)findViewById(R.id.uiuser_existinguser); + uiuser_existinguser.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Intent intent = new Intent(getApplicationContext(), ExistingParentActivity.class); + startActivity(intent); + } + }); + + uiuser_checkin = (Button)findViewById(R.id.uiuser_checkin); + uiuser_checkin.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + LayoutInflater inflater = getLayoutInflater(); + View layout = inflater.inflate(R.layout.toast_layout, + (ViewGroup) findViewById(R.id.toast_layout_root)); + + TextView text = (TextView) layout.findViewById(R.id.text); + text.setText("Coming Soon to Communities Near You"); + + Toast toast = new Toast(getApplicationContext()); + toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0); + toast.setDuration(Toast.LENGTH_SHORT); + toast.setView(layout); + toast.show(); + + } + }); + } + + private void startSearch() { + Intent intent = new Intent(this, JSONMainActivity.class); + startActivity(intent); + + } + + private void startCategories() { + Intent intent = new Intent(this, Categories.class); + startActivity(intent); + + } + + private void startNewUser() { + Intent intent = new Intent(this, NewParentActivity.class); + startActivity(intent); + } + + +} diff --git a/Youth_Connect/app/src/main/res/drawable/afterschool_button.xml b/Youth_Connect/app/src/main/res/drawable/afterschool_button.xml new file mode 100644 index 0000000..a339816 --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/afterschool_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/appicon.png b/Youth_Connect/app/src/main/res/drawable/appicon.png new file mode 100644 index 0000000..1fd2216 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/appicon.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/backicon.png b/Youth_Connect/app/src/main/res/drawable/backicon.png new file mode 100644 index 0000000..34252b3 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/backicon.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/bg_card.xml b/Youth_Connect/app/src/main/res/drawable/bg_card.xml new file mode 100644 index 0000000..d51d320 --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/bg_card.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/caraccidents.jpg b/Youth_Connect/app/src/main/res/drawable/caraccidents.jpg new file mode 100644 index 0000000..60d79ef Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/caraccidents.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/children.jpg b/Youth_Connect/app/src/main/res/drawable/children.jpg new file mode 100644 index 0000000..5f31f29 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/children.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/children1.png b/Youth_Connect/app/src/main/res/drawable/children1.png new file mode 100644 index 0000000..b6d98b2 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/children1.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/children_button.xml b/Youth_Connect/app/src/main/res/drawable/children_button.xml new file mode 100644 index 0000000..59dff3b --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/children_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/circle_button.xml b/Youth_Connect/app/src/main/res/drawable/circle_button.xml new file mode 100644 index 0000000..0ed9288 --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/circle_button.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/coordinator_button.xml b/Youth_Connect/app/src/main/res/drawable/coordinator_button.xml new file mode 100644 index 0000000..fd1ce4b --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/coordinator_button.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/daytime_care_button.xml b/Youth_Connect/app/src/main/res/drawable/daytime_care_button.xml new file mode 100644 index 0000000..49603d8 --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/daytime_care_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/enter_button.xml b/Youth_Connect/app/src/main/res/drawable/enter_button.xml new file mode 100644 index 0000000..303dafb --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/enter_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/existing_coordinator_button.xml b/Youth_Connect/app/src/main/res/drawable/existing_coordinator_button.xml new file mode 100644 index 0000000..fd1ce4b --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/existing_coordinator_button.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/gecko.png b/Youth_Connect/app/src/main/res/drawable/gecko.png new file mode 100644 index 0000000..e9e454a Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/gecko.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/goicon.png b/Youth_Connect/app/src/main/res/drawable/goicon.png new file mode 100644 index 0000000..e26bcf9 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/goicon.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/green_button.xml b/Youth_Connect/app/src/main/res/drawable/green_button.xml new file mode 100644 index 0000000..d8c07e8 --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/green_button.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/hungerstats.jpg b/Youth_Connect/app/src/main/res/drawable/hungerstats.jpg new file mode 100644 index 0000000..4e34962 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/hungerstats.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/nycedu.jpg b/Youth_Connect/app/src/main/res/drawable/nycedu.jpg new file mode 100644 index 0000000..ac8ff51 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/nycedu.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/nydyd.jpg b/Youth_Connect/app/src/main/res/drawable/nydyd.jpg new file mode 100644 index 0000000..984ea7c Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/nydyd.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/prek.png b/Youth_Connect/app/src/main/res/drawable/prek.png new file mode 100644 index 0000000..d802330 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/prek.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/prek_kindergarten_button.xml b/Youth_Connect/app/src/main/res/drawable/prek_kindergarten_button.xml new file mode 100644 index 0000000..983ba70 --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/prek_kindergarten_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/qch.jpg b/Youth_Connect/app/src/main/res/drawable/qch.jpg new file mode 100644 index 0000000..15cb6ba Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/qch.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/recreation_button.xml b/Youth_Connect/app/src/main/res/drawable/recreation_button.xml new file mode 100644 index 0000000..23b10aa --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/recreation_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/register_button.xml b/Youth_Connect/app/src/main/res/drawable/register_button.xml new file mode 100644 index 0000000..36fd0e4 --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/register_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/register_cordinator_button.xml b/Youth_Connect/app/src/main/res/drawable/register_cordinator_button.xml new file mode 100644 index 0000000..fd1ce4b --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/register_cordinator_button.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/sonyc.jpg b/Youth_Connect/app/src/main/res/drawable/sonyc.jpg new file mode 100644 index 0000000..7369fd7 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/sonyc.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/student.png b/Youth_Connect/app/src/main/res/drawable/student.png new file mode 100644 index 0000000..37731a7 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/student.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/students_button.xml b/Youth_Connect/app/src/main/res/drawable/students_button.xml new file mode 100644 index 0000000..5ea030e --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/students_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/summermeals.jpg b/Youth_Connect/app/src/main/res/drawable/summermeals.jpg new file mode 100644 index 0000000..693ce97 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/summermeals.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/syep.jpeg b/Youth_Connect/app/src/main/res/drawable/syep.jpeg new file mode 100644 index 0000000..1b70e1e Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/syep.jpeg differ diff --git a/Youth_Connect/app/src/main/res/drawable/teen_birthrates.png b/Youth_Connect/app/src/main/res/drawable/teen_birthrates.png new file mode 100644 index 0000000..2cf8ce4 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/teen_birthrates.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/teen_button.xml b/Youth_Connect/app/src/main/res/drawable/teen_button.xml new file mode 100644 index 0000000..c8b14af --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/teen_button.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/teens.png b/Youth_Connect/app/src/main/res/drawable/teens.png new file mode 100644 index 0000000..94c6fa7 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/teens.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/unemployed_youth.png b/Youth_Connect/app/src/main/res/drawable/unemployed_youth.png new file mode 100644 index 0000000..7c743cf Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/unemployed_youth.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/yellow_button.xml b/Youth_Connect/app/src/main/res/drawable/yellow_button.xml new file mode 100644 index 0000000..0fc1ea6 --- /dev/null +++ b/Youth_Connect/app/src/main/res/drawable/yellow_button.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/drawable/youth_breakfast.jpg b/Youth_Connect/app/src/main/res/drawable/youth_breakfast.jpg new file mode 100644 index 0000000..1cb65c9 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/youth_breakfast.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/youth_council.jpg b/Youth_Connect/app/src/main/res/drawable/youth_council.jpg new file mode 100644 index 0000000..599930b Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/youth_council.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/youth_hiv.jpg b/Youth_Connect/app/src/main/res/drawable/youth_hiv.jpg new file mode 100644 index 0000000..b92a9a1 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/youth_hiv.jpg differ diff --git a/Youth_Connect/app/src/main/res/drawable/youth_homeless.png b/Youth_Connect/app/src/main/res/drawable/youth_homeless.png new file mode 100644 index 0000000..26acf97 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/youth_homeless.png differ diff --git a/Youth_Connect/app/src/main/res/drawable/youth_pregnancy_birth.png b/Youth_Connect/app/src/main/res/drawable/youth_pregnancy_birth.png new file mode 100644 index 0000000..e139a77 Binary files /dev/null and b/Youth_Connect/app/src/main/res/drawable/youth_pregnancy_birth.png differ diff --git a/Youth_Connect/app/src/main/res/layout/activity_existing_coordinator.xml b/Youth_Connect/app/src/main/res/layout/activity_existing_coordinator.xml new file mode 100644 index 0000000..e0f8419 --- /dev/null +++ b/Youth_Connect/app/src/main/res/layout/activity_existing_coordinator.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/layout/activity_existing_user.xml b/Youth_Connect/app/src/main/res/layout/activity_existing_user.xml new file mode 100644 index 0000000..0ac7a5d --- /dev/null +++ b/Youth_Connect/app/src/main/res/layout/activity_existing_user.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/layout/activity_registration.xml b/Youth_Connect/app/src/main/res/layout/activity_registration.xml new file mode 100644 index 0000000..5f9bb60 --- /dev/null +++ b/Youth_Connect/app/src/main/res/layout/activity_registration.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + diff --git a/Youth_Connect/app/src/main/res/layout/activity_uimain.xml b/Youth_Connect/app/src/main/res/layout/activity_uimain.xml new file mode 100644 index 0000000..0c6dc2a --- /dev/null +++ b/Youth_Connect/app/src/main/res/layout/activity_uimain.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/Youth_Connect/app/src/main/res/layout/coordinators.xml b/Youth_Connect/app/src/main/res/layout/coordinators.xml new file mode 100644 index 0000000..a7e50f1 --- /dev/null +++ b/Youth_Connect/app/src/main/res/layout/coordinators.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Youth_Connect/app/src/main/res/layout/custom_dialog.xml b/Youth_Connect/app/src/main/res/layout/custom_dialog.xml new file mode 100644 index 0000000..ae09fbd --- /dev/null +++ b/Youth_Connect/app/src/main/res/layout/custom_dialog.xml @@ -0,0 +1,38 @@ + + + + + + + +