diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 00000000..1c42e713
Binary files /dev/null and b/.DS_Store differ
diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF
new file mode 100755
index 00000000..786d3494
--- /dev/null
+++ b/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.8.0_45 (Oracle Corporation)
+
diff --git a/homework/.DS_Store b/homework/.DS_Store
new file mode 100644
index 00000000..b7082807
Binary files /dev/null and b/homework/.DS_Store differ
diff --git a/homework/week-1.md b/homework/week-1.md
index 16754aca..e6c02c69 100644
--- a/homework/week-1.md
+++ b/homework/week-1.md
@@ -46,7 +46,8 @@ Create at least one change based on the code review you receive.
##### Exercise 2: Horoscope app
Create a horoscope app with the following features:
-* A [navigation drawer](https://developer.android.com/design/patterns/navigation-drawer.html).
+
+1. A [navigation drawer](https://developer.android.com/design/patterns/navigation-drawer.html).
* An feature which displays the option to choose one of several different types of "signs". When the sign is
selected, display information about the sign.
* A feature where a user can enter their birthdate and receive information about what their sign is.
diff --git a/homework/week-1/.DS_Store b/homework/week-1/.DS_Store
new file mode 100644
index 00000000..c94923b9
Binary files /dev/null and b/homework/week-1/.DS_Store differ
diff --git a/homework/week-1/reinardcox/.DS_Store b/homework/week-1/reinardcox/.DS_Store
new file mode 100644
index 00000000..0798106e
Binary files /dev/null and b/homework/week-1/reinardcox/.DS_Store differ
diff --git a/homework/week-1/reinardcox/Horoscope/.gitignore b/homework/week-1/reinardcox/Horoscope/.gitignore
new file mode 100644
index 00000000..347023b3
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/.gitignore
@@ -0,0 +1,17 @@
+.DS_Store
+.idea/workspace.xml
+.ideal/uiDesigner.xml
+target
+*.iml
+.idea
+build
+.gradle
+local.properties
+*~
+
+/.idea/libraries
+/captures
+
+
+
+
diff --git a/homework/week-1/reinardcox/Horoscope/Horoscope.iml b/homework/week-1/reinardcox/Horoscope/Horoscope.iml
new file mode 100644
index 00000000..ec001f14
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/Horoscope.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/.gitignore b/homework/week-1/reinardcox/Horoscope/app/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/homework/week-1/reinardcox/Horoscope/app/app.iml b/homework/week-1/reinardcox/Horoscope/app/app.iml
new file mode 100644
index 00000000..dcd6ec68
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/app.iml
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugAndroidTestSources
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/build.gradle b/homework/week-1/reinardcox/Horoscope/app/build.gradle
new file mode 100644
index 00000000..7b7ab040
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/build.gradle
@@ -0,0 +1,28 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 22
+ buildToolsVersion "22.0.1"
+
+ defaultConfig {
+ applicationId "reinardcox.c4q.nyc.horoscope"
+ 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.1.1'
+ compile files('libs/HoroscopeAPI1.7.jar')
+ compile files('lib/HoroscopeAPI1.7.jar')
+ compile files('lib/http-request-6.0.jar')
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/lib/http-request-6.0.jar b/homework/week-1/reinardcox/Horoscope/app/lib/http-request-6.0.jar
new file mode 100644
index 00000000..a912660a
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/lib/http-request-6.0.jar differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/proguard-rules.pro b/homework/week-1/reinardcox/Horoscope/app/proguard-rules.pro
new file mode 100644
index 00000000..b44dcbf7
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Users\Shadow\AppData\Local\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/homework/week-1/reinardcox/Horoscope/app/src/androidTest/java/reinardcox/c4q/nyc/horoscope/ApplicationTest.java b/homework/week-1/reinardcox/Horoscope/app/src/androidTest/java/reinardcox/c4q/nyc/horoscope/ApplicationTest.java
new file mode 100644
index 00000000..b8cd742c
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/androidTest/java/reinardcox/c4q/nyc/horoscope/ApplicationTest.java
@@ -0,0 +1,13 @@
+package reinardcox.c4q.nyc.horoscope;
+
+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/homework/week-1/reinardcox/Horoscope/app/src/main/AndroidManifest.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..bbb9306b
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/AndroidManifest.xml
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/assets/fonts/ObelixProBIt-cyr.ttf b/homework/week-1/reinardcox/Horoscope/app/src/main/assets/fonts/ObelixProBIt-cyr.ttf
new file mode 100644
index 00000000..cfa7d12e
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/assets/fonts/ObelixProBIt-cyr.ttf differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Aquarius_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Aquarius_Activity.java
new file mode 100644
index 00000000..d0cb8b92
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Aquarius_Activity.java
@@ -0,0 +1,133 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Aquarius_Activity extends AppCompatActivity {
+
+ TextView _display;
+ ProgressBar _loader;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.aquarius_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Aquarius);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Aquarius);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Aquarius, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Aquarius, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Aquarius, HoroscopeReading.Love));
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+
+ //===============================================
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Aries_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Aries_Activity.java
new file mode 100644
index 00000000..5c4a086a
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Aries_Activity.java
@@ -0,0 +1,133 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Aries_Activity extends AppCompatActivity {
+
+ TextView _display;
+ ProgressBar _loader;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.aries_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Aries);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Aries);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Aries, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Aries, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Aries, HoroscopeReading.Love));
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+
+
+}
+
+
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Cancer_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Cancer_Activity.java
new file mode 100644
index 00000000..3bfe3308
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Cancer_Activity.java
@@ -0,0 +1,128 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Cancer_Activity extends AppCompatActivity {
+
+ TextView _display;
+ ProgressBar _loader;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.cancer_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Cancer);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Cancer);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Cancer, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Cancer, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Cancer, HoroscopeReading.Love));
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Capricorn_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Capricorn_Activity.java
new file mode 100644
index 00000000..f18bd567
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Capricorn_Activity.java
@@ -0,0 +1,127 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Capricorn_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.capricorn_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Capricorn);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Capricorn);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Capricorn, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Capricorn, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Capricorn, HoroscopeReading.Love));
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Gemini_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Gemini_Activity.java
new file mode 100644
index 00000000..dbfc58fd
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Gemini_Activity.java
@@ -0,0 +1,127 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Gemini_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.gemini_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Gemini);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Gemini);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Gemini, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Gemini, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Gemini, HoroscopeReading.Love));
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Home_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Home_Activity.java
new file mode 100644
index 00000000..e7124893
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Home_Activity.java
@@ -0,0 +1,164 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.content.Intent;
+import android.graphics.Typeface;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageButton;
+import android.widget.TextView;
+
+public class Home_Activity extends AppCompatActivity {
+
+ private TextView _display, _display2;
+ private ImageButton _aries, _taurus, _gemini, _cancer, _leo, _virgo, _libra, _scorpio, _sagittarius, _capricorn, _aquarius, _pisces;
+ private Intent _one, _two, _three, _four, _five, _six, _seven, _eight, _nine, _ten, _eleven, _twelve, _sign;
+ private Button _chooseSign;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.home_layout);
+
+ _display = (TextView) findViewById(R.id.title_zodiac_sign);
+ _display2 = (TextView) findViewById(R.id.title_zodiac_sign2);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ _display.setTypeface(typeface);
+ _display2.setTypeface(typeface);
+
+ _aries = (ImageButton) findViewById(R.id.aries_id); //Associated with _one Intent variable
+ _taurus = (ImageButton) findViewById(R.id.taurus_id); //Associated with _two Intent variable
+ _gemini = (ImageButton) findViewById(R.id.gemini_id); //Associated with _three Intent variable
+ _cancer = (ImageButton) findViewById(R.id.cancer_id); //Associated with _four Intent variable
+ _leo = (ImageButton) findViewById(R.id.leo_id); //Associated with _five Intent variable
+ _virgo = (ImageButton) findViewById(R.id.virgo_id); //Associated with _six Intent variable
+ _libra = (ImageButton) findViewById(R.id.libra_id); //Associated with _seven Intent variable
+ _scorpio = (ImageButton) findViewById(R.id.scorpio_id); //Associated with _eight Intent variable
+ _sagittarius = (ImageButton) findViewById(R.id.sagittarius_id); //Associated with _nine Intent variable
+ _capricorn = (ImageButton) findViewById(R.id.capricorn_id); //Associated with _ten Intent variable
+ _aquarius = (ImageButton) findViewById(R.id.aquarius_id); //Associated with _eleven Intent variable
+ _pisces = (ImageButton) findViewById(R.id.pisces_id); //Associated with _Twelve Intent variable
+
+ _one = new Intent(this, Aries_Activity.class);
+ _one.putExtra("sign","aries");
+ _two = new Intent(this, Taurus_Activity.class);
+ _three = new Intent(this, Gemini_Activity.class);
+ _four = new Intent(this, Cancer_Activity.class);
+ _five = new Intent(this, Leo_Activity.class);
+ _six = new Intent(this, Virgo_Activity.class);
+ _seven = new Intent(this, Libra_Activity.class);
+ _eight = new Intent(this, Scorpio_Activity.class);
+ _nine = new Intent(this, Sagittarius_Activity.class);
+ _ten = new Intent (this, Capricorn_Activity.class);
+ _eleven = new Intent(this, Aquarius_Activity.class);
+ _twelve = new Intent(this, Pisces_Activity.class);
+ //_sign = new Intent(this, See_What_Sign.class);
+
+ _aries.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_one);
+ }
+ });
+
+ _taurus.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_two);
+ }
+ });
+
+ _gemini.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_three);
+ }
+ });
+
+ _cancer.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_four);
+ }
+ });
+
+ _leo.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_five);
+ }
+ });
+
+ _virgo.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_six);
+ }
+ });
+
+ _libra.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_seven);
+ }
+ });
+
+ _scorpio.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_eight);
+ }
+ });
+
+ _sagittarius.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_nine);
+ }
+ });
+
+ _capricorn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_ten);
+ }
+ });
+
+ _aquarius.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_eleven);
+ }
+ });
+
+ _pisces.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_twelve);
+ }
+ });
+
+ _chooseSign = (Button) findViewById(R.id.choose_sign_id);
+
+ _chooseSign.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(_sign);
+ }
+ });
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeAPI.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeAPI.java
new file mode 100644
index 00000000..8fbf432e
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeAPI.java
@@ -0,0 +1,103 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.sql.Date;
+
+
+public final class HoroscopeAPI {
+ private final String url = "http://www.xiaoergeblessed.com/API/HoroscopeAPI/HoroscopeAPI.php";
+ private final int id;
+ private final String[][] horoscope_reading;
+ private final String[] zodiac_reading;
+ private final boolean isPaid;
+ private final Date expiration;
+ private long lastmod;
+
+ public HoroscopeAPI(int id) throws MalformedURLException, IOException, SQLExcpetion {
+ this.id = id;
+ this.horoscope_reading = new String[12][6];
+ this.zodiac_reading = new String[12];
+ this.isPaid = false;
+ this.expiration = new Date(System.currentTimeMillis());
+ this.lastmod = 0L;
+ this.getReading();
+ }
+
+ public final String getZodiacReading(ZodiacSign sign, ZodiacReading reading) {
+ return this.zodiac_reading[sign.ordinal()];
+ }
+
+ public final String getHoroscopeReading(HoroscopeSign sign, HoroscopeReading reading) {
+ return this.horoscope_reading[sign.ordinal()][reading.ordinal()];
+ }
+
+ private final void getReading() throws MalformedURLException, IOException, SQLExcpetion {
+ HttpURLConnection con = (HttpURLConnection)(new URL(this.url + "?" + "id=" + this.id)).openConnection();
+ con.setRequestProperty("User-Agent", "HoroscopeAPI");
+ BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));
+ String str = "";
+
+ int ex;
+ for(ex = 0; ex < this.horoscope_reading.length; ++ex) {
+ for(int j = 0; j < this.horoscope_reading[ex].length; ++j) {
+ str = reader.readLine();
+ if(str.contains("ERROR")) {
+ throw new SQLExcpetion(reader.readLine());
+ }
+
+ this.horoscope_reading[ex][j] = str;
+ }
+ }
+
+ for(ex = 0; ex < this.zodiac_reading.length; ++ex) {
+ str = reader.readLine();
+ if(str.contains("ERROR")) {
+ throw new SQLExcpetion(reader.readLine());
+ }
+
+ this.zodiac_reading[ex] = str;
+ }
+
+ try {
+ String var7 = reader.readLine();
+ this.lastmod = Long.parseLong(var7) * 1000L;
+ } catch (Exception var6) {
+ this.lastmod = 0L;
+ }
+
+ reader.close();
+ }
+
+ public final String getDeveloperInfo() {
+ String developer = "Xiaoerge";
+ String appname = "HoroscopeAPI";
+ String appversion = "1.0";
+ String supportemail = "horoscope@xiaoergeblessed.com";
+ String website = "http://www.xiaoergeblessed.com";
+ return developer + "\n" + appname + "\n" + appversion + "\n" + supportemail + "\n" + website;
+ }
+
+ public final long getLastModified() {
+ return this.lastmod;
+ }
+
+ public final String getSignInfo(HoroscopeSign hsign) {
+ return hsign.getInfo();
+ }
+
+ public final String getSignInfo(ZodiacSign zsign) {
+ return zsign.getInfo();
+ }
+
+ public final String getSignSymbol(HoroscopeSign hsign) {
+ return hsign.getSymbol();
+ }
+ public final String getSignSymbol(ZodiacSign zsign) {
+ return zsign.getSymbol();
+ }
+}
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeReading.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeReading.java
new file mode 100644
index 00000000..61efdf53
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeReading.java
@@ -0,0 +1,17 @@
+package reinardcox.c4q.nyc.horoscope;
+
+/**
+ * Created by shadowslimmedia on 5/26/15.
+ */
+
+public enum HoroscopeReading {
+ Daily_Horoscope,
+ Weekly_Horoscope,
+ Monthly_Horoscope,
+ Love,
+ Career,
+ Wellness;
+
+ private HoroscopeReading() {
+ }
+}
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeSign.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeSign.java
new file mode 100644
index 00000000..c6dcd127
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/HoroscopeSign.java
@@ -0,0 +1,36 @@
+package reinardcox.c4q.nyc.horoscope;
+
+/**
+ * Created by shadowslimmedia on 5/26/15.
+ */
+
+public enum HoroscopeSign {
+ Aries("3/21-4/19", "♈"),
+ Taurus("4/20-5/20", "♉"),
+ Gemini("5/21-6/21", "♊"),
+ Cancer("6/22-7/22", "♋"),
+ Leo("7/23-8/22", "♌"),
+ Virgo("8/23-9/22", "♍"),
+ Libra("9/23-10/22", "♎"),
+ Scorpio("10/23-11/21", "♏"),
+ Sagittarius("11/22-12/21", "♐"),
+ Capricorn("12/22-01/19", "♑"),
+ Aquarius("01/20-02/18", "♒"),
+ Pisces("02/19-03/20", "♓");
+
+ private String infoh;
+ private String symbol;
+
+ private HoroscopeSign(String s, String s2) {
+ this.infoh = s;
+ this.symbol = s2;
+ }
+
+ protected String getInfo() {
+ return this.infoh;
+ }
+
+ protected String getSymbol() {
+ return this.symbol;
+ }
+}
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Leo_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Leo_Activity.java
new file mode 100644
index 00000000..b2396dec
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Leo_Activity.java
@@ -0,0 +1,124 @@
+package reinardcox.c4q.nyc.horoscope;
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Leo_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.leo_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Leo);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Leo);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Leo, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Leo, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Leo, HoroscopeReading.Love));
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Libra_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Libra_Activity.java
new file mode 100644
index 00000000..f117faf3
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Libra_Activity.java
@@ -0,0 +1,125 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Libra_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.libra_layout);
+ _display = (TextView) findViewById(R.id.textView_Libra);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Libra);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Libra, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Libra, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Libra, HoroscopeReading.Love));
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Pisces_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Pisces_Activity.java
new file mode 100644
index 00000000..0b2079de
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Pisces_Activity.java
@@ -0,0 +1,125 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Pisces_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.pisces_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Pisces);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Pisces);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Pisces, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Pisces, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Pisces, HoroscopeReading.Love));
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/PrivilegeException.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/PrivilegeException.java
new file mode 100644
index 00000000..bc55fc8e
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/PrivilegeException.java
@@ -0,0 +1,21 @@
+package reinardcox.c4q.nyc.horoscope;
+
+/**
+ * Created by shadowslimmedia on 5/26/15.
+ */
+public class PrivilegeException extends Exception {
+ public PrivilegeException() {
+ }
+
+ public PrivilegeException(String message) {
+ super(message);
+ }
+
+ public PrivilegeException(Throwable cause) {
+ super(cause);
+ }
+
+ public PrivilegeException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/SQLExcpetion.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/SQLExcpetion.java
new file mode 100644
index 00000000..72525873
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/SQLExcpetion.java
@@ -0,0 +1,22 @@
+package reinardcox.c4q.nyc.horoscope;
+
+/**
+ * Created by shadowslimmedia on 5/26/15.
+ */
+
+public class SQLExcpetion extends Exception {
+ public SQLExcpetion() {
+ }
+
+ public SQLExcpetion(String message) {
+ super(message);
+ }
+
+ public SQLExcpetion(Throwable cause) {
+ super(cause);
+ }
+
+ public SQLExcpetion(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Sagittarius_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Sagittarius_Activity.java
new file mode 100644
index 00000000..7089cf3e
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Sagittarius_Activity.java
@@ -0,0 +1,123 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Sagittarius_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.sagittarius_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Sagittarius);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Sagittarius);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Sagittarius, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Sagittarius, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Sagittarius, HoroscopeReading.Love));
+ }
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Scorpio_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Scorpio_Activity.java
new file mode 100644
index 00000000..bc939b57
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Scorpio_Activity.java
@@ -0,0 +1,124 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Scorpio_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.scorpio_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Scorpio);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Scorpio);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Scorpio, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Scorpio, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Scorpio, HoroscopeReading.Love));
+ }
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Splash_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Splash_Activity.java
new file mode 100644
index 00000000..5ac15eb7
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Splash_Activity.java
@@ -0,0 +1,41 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.graphics.Typeface;
+import android.os.Bundle;
+import android.os.CountDownTimer;
+import android.widget.TextView;
+
+public class Splash_Activity extends Activity {
+ protected TextView _mainTitle, _authorTitle; // Ask about the protected vs. private
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.splash_layout);
+
+ _mainTitle = (TextView) findViewById(R.id.main_title);
+ _authorTitle = (TextView) findViewById(R.id.author_title);
+
+ //This imports the custom font being used.
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ //Apply the font to the TextView
+ _mainTitle.setTypeface(typeface);
+ _authorTitle.setTypeface(typeface);
+
+ final Intent intent = new Intent(this, Home_Activity.class);
+
+ new CountDownTimer(2000, 1000) {
+ public void onTick(long millisUntilFinished) {
+ // mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
+ }
+
+ public void onFinish() {
+ startActivity(intent);
+ finish();
+ }
+ }.start();
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Taurus_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Taurus_Activity.java
new file mode 100644
index 00000000..7977a13a
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Taurus_Activity.java
@@ -0,0 +1,126 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Taurus_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.taurus_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Taurus);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Taurus);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Taurus, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Taurus, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Taurus, HoroscopeReading.Love));
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Virgo_Activity.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Virgo_Activity.java
new file mode 100644
index 00000000..eeea00cf
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/Virgo_Activity.java
@@ -0,0 +1,126 @@
+package reinardcox.c4q.nyc.horoscope;
+
+import android.graphics.Typeface;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+
+public class Virgo_Activity extends AppCompatActivity {
+ TextView _display;
+ ProgressBar _loader;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.virgo_layout);
+
+ _display = (TextView) findViewById(R.id.textView_Virgo);
+ _loader = (ProgressBar) findViewById(R.id.progressBar_Virgo);
+
+ MyTask myTask = new MyTask();
+ myTask.execute(new MyObjectWrapper(HoroscopeSign.Virgo, HoroscopeReading.Daily_Horoscope),
+ new MyObjectWrapper(HoroscopeSign.Virgo, HoroscopeReading.Career),
+ new MyObjectWrapper(HoroscopeSign.Virgo, HoroscopeReading.Love));
+ }
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu items for use in the action bar
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.action_bar_menu, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ static class ObjectSwitcher {
+
+ final String reading;
+ final HoroscopeReading input;
+
+ ObjectSwitcher(String reading, HoroscopeReading input) {
+ this.reading = reading;
+ this.input = input;
+ }
+ }
+
+ static class MyObjectWrapper { //It's not the same content of this class...
+ final HoroscopeSign enum1;
+ final HoroscopeReading enum2;
+
+
+ MyObjectWrapper(HoroscopeSign enum1, HoroscopeReading enum2) {
+ this.enum1 = enum1;
+ this.enum2 = enum2;
+ }
+ }
+
+ private class MyTask extends AsyncTask> {
+
+
+ @Override
+ protected void onPostExecute(ArrayList s) {
+ super.onPostExecute(s);
+
+ Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/ObelixProBIt-cyr.ttf");
+
+ for (ObjectSwitcher words : s) {
+ _display.setTypeface(typeface);
+ _display.append(words.input.name() + "\n");
+
+
+ _display.append(words.reading + "\n\n");
+ }
+
+ _loader.setVisibility(View.INVISIBLE);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ _loader.setVisibility(View.VISIBLE);
+ }
+
+
+ @Override
+ protected ArrayList doInBackground(MyObjectWrapper... params) {
+
+ ArrayList stringArrayList = new ArrayList<>();
+
+ for (MyObjectWrapper obj : params) {
+
+ try {
+ HoroscopeAPI api = new HoroscopeAPI(10000);
+ String reading = "";
+
+ //you want to get love reading for libra
+ reading = api.getHoroscopeReading(obj.enum1, obj.enum2);
+
+ stringArrayList.add(new ObjectSwitcher(reading, obj.enum2));
+
+
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ stringArrayList.add(new ObjectSwitcher(ex.getMessage(), obj.enum2));
+
+ } catch (IOException ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot get stream from server", obj.enum2));
+ } catch (SQLExcpetion ex) {
+ stringArrayList.add(new ObjectSwitcher("Cannot connect to database", obj.enum2));
+ }
+
+ }
+ return stringArrayList;
+
+ }
+
+
+ }
+}
+
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/ZodiacReading.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/ZodiacReading.java
new file mode 100644
index 00000000..6cb09d42
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/ZodiacReading.java
@@ -0,0 +1,11 @@
+package reinardcox.c4q.nyc.horoscope;
+
+/**
+ * Created by shadowslimmedia on 5/26/15.
+ */
+public enum ZodiacReading {
+ Daily_Zodiac;
+
+ private ZodiacReading() {
+ }
+}
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/ZodiacSign.java b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/ZodiacSign.java
new file mode 100644
index 00000000..e6a4c114
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/java/reinardcox/c4q/nyc/horoscope/ZodiacSign.java
@@ -0,0 +1,35 @@
+package reinardcox.c4q.nyc.horoscope;
+
+/**
+ * Created by shadowslimmedia on 5/26/15.
+ */
+public enum ZodiacSign {
+ Rat("1972, 1984, 1996, 2008", "鼠"),
+ Ox("1973, 1985, 1997, 2009", "牛"),
+ Tiger("1974, 1986, 1998, 2010", "虎"),
+ Rabbit("1975, 1987, 1999, 2011", "兔"),
+ Dragon("1976, 1988, 2000, 2012", "龙"),
+ Snake("1977, 1989, 2001, 2013", "蛇"),
+ Horse("1978, 1990, 2002, 2014", "马"),
+ Sheep("1979, 1991, 2003, 2015", "羊"),
+ Monkey("1980, 1992, 2004, 2016", "猴"),
+ Rooster("1981, 1993, 2005, 2017", "鸡"),
+ Dog("1982, 1994, 2006, 2018", "狗"),
+ Pig("1983, 1995, 2007, 2019", "猪");
+
+ private String infoz;
+ private String symbol;
+
+ private ZodiacSign(String s, String s2) {
+ this.infoz = s;
+ this.symbol = s2;
+ }
+
+ protected String getInfo() {
+ return this.infoz;
+ }
+
+ protected String getSymbol() {
+ return this.symbol;
+ }
+}
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/aquarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/aquarius.9.png
new file mode 100644
index 00000000..335ac4db
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/aquarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/aries.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/aries.9.png
new file mode 100644
index 00000000..6ef3af6c
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/aries.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/background_home_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/background_home_screen.9.png
new file mode 100644
index 00000000..50b66cdc
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/background_home_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/background_splash_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/background_splash_screen.9.png
new file mode 100644
index 00000000..5fe799e0
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/background_splash_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/cancer.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/cancer.9.png
new file mode 100644
index 00000000..08b5edd9
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/cancer.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/capricorn.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/capricorn.9.png
new file mode 100644
index 00000000..32d0f75d
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/capricorn.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/gemini.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/gemini.9.png
new file mode 100644
index 00000000..f346b467
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/gemini.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/ic_settings.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/ic_settings.png
new file mode 100644
index 00000000..51f77cac
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/ic_settings.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/leo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/leo.9.png
new file mode 100644
index 00000000..b3fac0bd
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/leo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/libra.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/libra.9.png
new file mode 100644
index 00000000..1a53705e
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/libra.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/logo_splashscreen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/logo_splashscreen.9.png
new file mode 100644
index 00000000..b17bac38
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/logo_splashscreen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/pisces.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/pisces.9.png
new file mode 100644
index 00000000..f2f896ad
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/pisces.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/sagittarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/sagittarius.9.png
new file mode 100644
index 00000000..d01d8de1
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/sagittarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/scorpio.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/scorpio.9.png
new file mode 100644
index 00000000..8f09c372
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/scorpio.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/taurus.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/taurus.9.png
new file mode 100644
index 00000000..0af7ef7c
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/taurus.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/virgo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/virgo.9.png
new file mode 100644
index 00000000..ffbd0e69
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-hdpi/virgo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/aquarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/aquarius.9.png
new file mode 100644
index 00000000..cf2fe553
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/aquarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/aries.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/aries.9.png
new file mode 100644
index 00000000..d3accc1c
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/aries.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/background_home_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/background_home_screen.9.png
new file mode 100644
index 00000000..24190865
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/background_home_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/background_splash_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/background_splash_screen.9.png
new file mode 100644
index 00000000..c53bf235
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/background_splash_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/cancer.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/cancer.9.png
new file mode 100644
index 00000000..f7f33b8b
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/cancer.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/capricorn.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/capricorn.9.png
new file mode 100644
index 00000000..68b0de7a
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/capricorn.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/gemini.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/gemini.9.png
new file mode 100644
index 00000000..3f698664
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/gemini.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/ic_settings.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/ic_settings.png
new file mode 100644
index 00000000..95532ebd
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/ic_settings.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/leo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/leo.9.png
new file mode 100644
index 00000000..eeb0124a
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/leo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/libra.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/libra.9.png
new file mode 100644
index 00000000..31e5ff4f
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/libra.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/logo_splashscreen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/logo_splashscreen.9.png
new file mode 100644
index 00000000..fc2edb96
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/logo_splashscreen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/pisces.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/pisces.9.png
new file mode 100644
index 00000000..10f90836
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/pisces.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/sagittarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/sagittarius.9.png
new file mode 100644
index 00000000..9408edd0
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/sagittarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/scorpio.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/scorpio.9.png
new file mode 100644
index 00000000..fdf43270
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/scorpio.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/taurus.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/taurus.9.png
new file mode 100644
index 00000000..82ea0607
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/taurus.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/virgo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/virgo.9.png
new file mode 100644
index 00000000..40ada00b
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-mdpi/virgo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/aquarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/aquarius.9.png
new file mode 100644
index 00000000..0ce65991
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/aquarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/aries.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/aries.9.png
new file mode 100644
index 00000000..06f23557
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/aries.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/background_home_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/background_home_screen.9.png
new file mode 100644
index 00000000..3016762a
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/background_home_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/background_splash_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/background_splash_screen.9.png
new file mode 100644
index 00000000..ac880494
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/background_splash_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/cancer.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/cancer.9.png
new file mode 100644
index 00000000..8c6eeaf3
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/cancer.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/capricorn.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/capricorn.9.png
new file mode 100644
index 00000000..d3c48961
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/capricorn.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/gemini.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/gemini.9.png
new file mode 100644
index 00000000..e82514f2
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/gemini.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/ic_settings.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/ic_settings.png
new file mode 100644
index 00000000..a271cf57
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/ic_settings.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/leo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/leo.9.png
new file mode 100644
index 00000000..a4f5905f
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/leo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/libra.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/libra.9.png
new file mode 100644
index 00000000..457aad8a
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/libra.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/logo_splashscreen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/logo_splashscreen.9.png
new file mode 100644
index 00000000..6a6e413c
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/logo_splashscreen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/pisces.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/pisces.9.png
new file mode 100644
index 00000000..379a4d27
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/pisces.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/sagittarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/sagittarius.9.png
new file mode 100644
index 00000000..535994ab
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/sagittarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/scorpio.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/scorpio.9.png
new file mode 100644
index 00000000..9df9cbfc
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/scorpio.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/taurus.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/taurus.9.png
new file mode 100644
index 00000000..ccfe8b86
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/taurus.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/virgo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/virgo.9.png
new file mode 100644
index 00000000..542dbbf1
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xhdpi/virgo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/aquarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/aquarius.9.png
new file mode 100644
index 00000000..c0348743
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/aquarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/aries.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/aries.9.png
new file mode 100644
index 00000000..a0eadc82
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/aries.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/background_home_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/background_home_screen.9.png
new file mode 100644
index 00000000..fb3c9fdc
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/background_home_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/background_splash_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/background_splash_screen.9.png
new file mode 100644
index 00000000..5c27aa9e
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/background_splash_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/cancer.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/cancer.9.png
new file mode 100644
index 00000000..be45275f
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/cancer.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/capricorn.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/capricorn.9.png
new file mode 100644
index 00000000..f767ae82
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/capricorn.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/gemini.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/gemini.9.png
new file mode 100644
index 00000000..7ddeba05
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/gemini.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/ic_settings.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/ic_settings.png
new file mode 100644
index 00000000..daca817d
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/ic_settings.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/leo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/leo.9.png
new file mode 100644
index 00000000..c4fb70b9
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/leo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/libra.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/libra.9.png
new file mode 100644
index 00000000..36c35f6c
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/libra.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/logo_splashscreen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/logo_splashscreen.9.png
new file mode 100644
index 00000000..80eb560e
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/logo_splashscreen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/pisces.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/pisces.9.png
new file mode 100644
index 00000000..3d3e99ce
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/pisces.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/sagittarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/sagittarius.9.png
new file mode 100644
index 00000000..08048b79
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/sagittarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/scorpio.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/scorpio.9.png
new file mode 100644
index 00000000..34b95bd4
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/scorpio.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/taurus.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/taurus.9.png
new file mode 100644
index 00000000..54a43780
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/taurus.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/virgo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/virgo.9.png
new file mode 100644
index 00000000..fa2f1f2f
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxhdpi/virgo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/aquarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/aquarius.9.png
new file mode 100644
index 00000000..a10db383
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/aquarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/aries.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/aries.9.png
new file mode 100644
index 00000000..a06feb16
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/aries.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/background_home_screen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/background_home_screen.9.png
new file mode 100644
index 00000000..730cc453
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/background_home_screen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/cancer.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/cancer.9.png
new file mode 100644
index 00000000..5d77a755
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/cancer.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/capricorn.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/capricorn.9.png
new file mode 100644
index 00000000..2929833c
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/capricorn.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/gemini.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/gemini.9.png
new file mode 100644
index 00000000..bed8e3bf
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/gemini.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/ic_settings.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/ic_settings.png
new file mode 100644
index 00000000..c9687a75
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/ic_settings.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/leo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/leo.9.png
new file mode 100644
index 00000000..39f43e4a
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/leo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/libra.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/libra.9.png
new file mode 100644
index 00000000..ca0a8d5e
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/libra.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/logo_splashscreen.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/logo_splashscreen.9.png
new file mode 100644
index 00000000..709c877c
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/logo_splashscreen.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/pisces.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/pisces.9.png
new file mode 100644
index 00000000..a32519e2
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/pisces.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/sagittarius.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/sagittarius.9.png
new file mode 100644
index 00000000..294ad88a
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/sagittarius.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/scorpio.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/scorpio.9.png
new file mode 100644
index 00000000..b15fb4e8
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/scorpio.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/taurus.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/taurus.9.png
new file mode 100644
index 00000000..32516611
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/taurus.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/virgo.9.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/virgo.9.png
new file mode 100644
index 00000000..1fbf9b2f
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/drawable-xxxhdpi/virgo.9.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/aquarius_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/aquarius_layout.xml
new file mode 100644
index 00000000..663f868f
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/aquarius_layout.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/aries_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/aries_layout.xml
new file mode 100644
index 00000000..4ffb38af
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/aries_layout.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/cancer_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/cancer_layout.xml
new file mode 100644
index 00000000..a9fd582f
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/cancer_layout.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/capricorn_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/capricorn_layout.xml
new file mode 100644
index 00000000..61ef04b7
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/capricorn_layout.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/choose_sign.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/choose_sign.xml
new file mode 100644
index 00000000..14dd5150
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/choose_sign.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/gemini_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/gemini_layout.xml
new file mode 100644
index 00000000..a65ee973
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/gemini_layout.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/home_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/home_layout.xml
new file mode 100644
index 00000000..527a7922
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/home_layout.xml
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/leo_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/leo_layout.xml
new file mode 100644
index 00000000..166f67fe
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/leo_layout.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/libra_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/libra_layout.xml
new file mode 100644
index 00000000..4a27976b
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/libra_layout.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/pisces_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/pisces_layout.xml
new file mode 100644
index 00000000..5bbee44d
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/pisces_layout.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/sagittarius_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/sagittarius_layout.xml
new file mode 100644
index 00000000..65e29aa8
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/sagittarius_layout.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/scorpio_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/scorpio_layout.xml
new file mode 100644
index 00000000..615986c7
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/scorpio_layout.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/splash_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/splash_layout.xml
new file mode 100644
index 00000000..39c5bc0c
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/splash_layout.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/taurus_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/taurus_layout.xml
new file mode 100644
index 00000000..6029ff1b
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/taurus_layout.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/virgo_layout.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/virgo_layout.xml
new file mode 100644
index 00000000..89e4dab2
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/layout/virgo_layout.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/menu/action_bar_menu.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/menu/action_bar_menu.xml
new file mode 100644
index 00000000..ebcdc1eb
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/menu/action_bar_menu.xml
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-hdpi/ic_launcher.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..fe159d54
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-mdpi/ic_launcher.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..ad098d32
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..d748f65b
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..bb898b3d
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..2d54a12b
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/values/strings.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..190e3519
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/values/strings.xml
@@ -0,0 +1,6 @@
+
+ Horoscope
+ BY REINARD COX
+ HOROSCOPE
+ Logo
+
diff --git a/homework/week-1/reinardcox/Horoscope/app/src/main/res/values/styles.xml b/homework/week-1/reinardcox/Horoscope/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000..766ab993
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/app/src/main/res/values/styles.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/homework/week-1/reinardcox/Horoscope/build.gradle b/homework/week-1/reinardcox/Horoscope/build.gradle
new file mode 100644
index 00000000..9405f3fd
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/build.gradle
@@ -0,0 +1,19 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.2.3'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
diff --git a/homework/week-1/reinardcox/Horoscope/gradle.properties b/homework/week-1/reinardcox/Horoscope/gradle.properties
new file mode 100644
index 00000000..1d3591c8
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
\ No newline at end of file
diff --git a/homework/week-1/reinardcox/Horoscope/gradle/wrapper/gradle-wrapper.jar b/homework/week-1/reinardcox/Horoscope/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..8c0fb64a
Binary files /dev/null and b/homework/week-1/reinardcox/Horoscope/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/homework/week-1/reinardcox/Horoscope/gradle/wrapper/gradle-wrapper.properties b/homework/week-1/reinardcox/Horoscope/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..0c71e760
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
diff --git a/homework/week-1/reinardcox/Horoscope/gradlew b/homework/week-1/reinardcox/Horoscope/gradlew
new file mode 100644
index 00000000..91a7e269
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/homework/week-1/reinardcox/Horoscope/gradlew.bat b/homework/week-1/reinardcox/Horoscope/gradlew.bat
new file mode 100644
index 00000000..8a0b282a
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/homework/week-1/reinardcox/Horoscope/settings.gradle b/homework/week-1/reinardcox/Horoscope/settings.gradle
new file mode 100644
index 00000000..e7b4def4
--- /dev/null
+++ b/homework/week-1/reinardcox/Horoscope/settings.gradle
@@ -0,0 +1 @@
+include ':app'