diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..39fb081
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..e7bedf3
--- /dev/null
+++ b/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..97626ba
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..0e23f8e
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..5d19981
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..f5e9010
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 4a040e1..fc9599d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
+<<<<<<< HEAD
+# mdbsocials
+=======
Repository for MDB Training Program Mini-Project Submissions
Finalized mini-projects should be stored in personal portfolios, but this repository will be used for providing feedback on code quality using the GitHub code review features.
-When pushing code to this repo, DO NOT push to master. Create a new branch and open a pull request.
\ No newline at end of file
+When pushing code to this repo, DO NOT push to master. Create a new branch and open a pull request.
+>>>>>>> e4b4b334b11749aa357bd2044b075854227e9e86
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..8258679
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,44 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 24
+ buildToolsVersion "24.0.2"
+ defaultConfig {
+ applicationId "com.mdb.training.katharine.mdbsocials"
+ minSdkVersion 14
+ targetSdkVersion 24
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+ exclude group: 'com.android.support', module: 'support-annotations'
+ })
+ compile 'com.android.support:appcompat-v7:24.2.1'
+ compile 'com.android.support:design:24.2.1'
+ compile 'com.google.firebase:firebase-core:9.6.1'
+ compile 'com.google.firebase:firebase-auth:9.6.1'
+ compile 'com.google.firebase:firebase-database:9.6.1'
+ compile 'com.google.firebase:firebase-storage:9.6.1'
+ compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
+ compile 'com.google.android.gms:play-services-auth:9.6.1'
+ compile 'com.google.android.gms:play-services-gcm:9.6.1'
+ compile 'com.android.support:recyclerview-v7:24.2.1'
+ compile 'com.android.support:cardview-v7:24.2.1'
+ compile 'com.android.support:support-v4:24.2.1'
+ compile 'com.github.bumptech.glide:glide:3.7.0'
+ compile 'com.android.support:palette-v7:24.2.1'
+ testCompile 'junit:junit:4.12'
+}
+
+apply plugin: 'com.google.gms.google-services'
diff --git a/app/google-services.json b/app/google-services.json
new file mode 100644
index 0000000..fe7e9f5
--- /dev/null
+++ b/app/google-services.json
@@ -0,0 +1,42 @@
+{
+ "project_info": {
+ "project_number": "510160351055",
+ "firebase_url": "https://mdbsocial-app.firebaseio.com",
+ "project_id": "mdbsocial-app",
+ "storage_bucket": "mdbsocial-app.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:510160351055:android:5ac4a500e2a0ef22",
+ "android_client_info": {
+ "package_name": "com.mdb.training.katharine.mdbsocials"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "510160351055-otm9a3teg2fb2m3csmd560d0tel17nq1.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyAl5BtrHgba8PDjaq0t_7rOKnU7gydWwa4"
+ }
+ ],
+ "services": {
+ "analytics_service": {
+ "status": 1
+ },
+ "appinvite_service": {
+ "status": 1,
+ "other_platform_oauth_client": []
+ },
+ "ads_service": {
+ "status": 2
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..ee53402
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /Users/KJ/Library/Android/sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/app/src/androidTest/java/com/mdb/training/katharine/mdbsocials/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/mdb/training/katharine/mdbsocials/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..fc1055c
--- /dev/null
+++ b/app/src/androidTest/java/com/mdb/training/katharine/mdbsocials/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumentation test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() throws Exception {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.mdb.training.katharine.mdbsocials", appContext.getPackageName());
+ }
+}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..c77728f
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/CreateNewSocial.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/CreateNewSocial.java
new file mode 100644
index 0000000..c0967c2
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/CreateNewSocial.java
@@ -0,0 +1,109 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.MediaStore;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.database.DatabaseReference;
+import com.google.firebase.database.FirebaseDatabase;
+import com.google.firebase.storage.FirebaseStorage;
+import com.google.firebase.storage.StorageReference;
+import com.google.firebase.storage.UploadTask;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+public class CreateNewSocial extends AppCompatActivity {
+
+ private EditText name;
+ private EditText date;
+ private EditText description;
+ private Button choosePic;
+ private Button createSocial;
+ private ArrayList socalsList;
+ private Uri selectedImage;
+
+ private FirebaseAuth mAuth;
+ // private FirebaseDatabase mData;
+ private DatabaseReference mDatabase;
+ private StorageReference storageReference;
+ private String firebasePath;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_create_new_social);
+
+ name = (EditText) findViewById(R.id.name);
+ date = (EditText) findViewById(R.id.date);
+ description = (EditText) findViewById(R.id.description);
+ choosePic = (Button) findViewById(R.id.pic);
+ createSocial = (Button) findViewById(R.id.create);
+
+
+ mAuth = FirebaseAuth.getInstance();
+ // mData = FirebaseDatabase.getInstance();
+ mDatabase = FirebaseDatabase.getInstance().getReference();
+
+ createSocial.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ createSocial();
+ startActivity(new Intent(CreateNewSocial.this, FeedActivity.class));
+ }
+ });
+
+ choosePic.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent pickPhoto = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
+ startActivityForResult(pickPhoto, 0);
+
+ }
+ });
+
+ }
+
+ protected void onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) {
+ super.onActivityResult(requestCode, resultCode, imageReturnedIntent);
+ if (resultCode == RESULT_OK && requestCode==0) {
+ int numSocials = getIntent().getExtras().getInt("numSocials") + 1;
+ firebasePath = "socialPics/" + numSocials + ".jpg";
+ StorageReference storageRef = FirebaseStorage.getInstance().getReference().child(firebasePath);
+ selectedImage = imageReturnedIntent.getData();
+ UploadTask uploadTask = storageRef.putFile(selectedImage);
+ }
+ }
+
+ public void createSocial() {
+ String n = name.getText().toString();
+ String d = date.getText().toString();
+ String descrip = description.getText().toString();
+ String author = mAuth.getCurrentUser().getEmail();
+ ArrayList interested = new ArrayList<>();
+ SocialsList.Social social = new SocialsList.Social(n, author, descrip, d, firebasePath);
+ Map post = new HashMap<>();
+ post.put("name", n);
+ post.put("author", author);
+ post.put("description", descrip);
+ post.put("date", d);
+ post.put("interested", interested);
+ post.put("path", firebasePath);
+ if (n.length() == 0 || d.length() == 0 || descrip.length() == 0 || firebasePath.length() == 0) {
+ Toast.makeText(getApplicationContext(), "Social not created. Please fill in all fields and upload a picture.", Toast.LENGTH_LONG).show();
+ } else {
+ mDatabase.child("Socials").push().setValue(post);
+ Toast.makeText(getApplicationContext(), "Social created.", Toast.LENGTH_LONG).show();
+ }
+
+
+ }
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/DetailsActivity.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/DetailsActivity.java
new file mode 100644
index 0000000..2cc3f9d
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/DetailsActivity.java
@@ -0,0 +1,330 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.design.widget.FloatingActionButton;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.graphics.Palette;
+import android.support.v7.widget.Toolbar;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.google.android.gms.tasks.OnSuccessListener;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.database.DataSnapshot;
+import com.google.firebase.database.DatabaseError;
+import com.google.firebase.database.DatabaseReference;
+import com.google.firebase.database.FirebaseDatabase;
+import com.google.firebase.database.ValueEventListener;
+import com.google.firebase.storage.FirebaseStorage;
+import com.google.firebase.storage.StorageReference;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+public class DetailsActivity extends AppCompatActivity {
+
+ private TextView eventName, date, author, description;
+ private Button numInterested;
+ private ImageView eventPic;
+ private CheckBox interested;
+ private String uid;
+ private Toolbar toolbar;
+ FloatingActionButton fab;
+ private ArrayList interestedName = new ArrayList<>();
+ private ArrayList interestedEmail = new ArrayList<>();
+ private ArrayList interestedUid = new ArrayList<>();
+ public int color;
+
+ private DatabaseReference dbRef;
+ private FirebaseAuth mAuth;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_details);
+ toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+
+ dbRef = FirebaseDatabase.getInstance().getReference();
+ mAuth = FirebaseAuth.getInstance();
+ uid = FirebaseAuth.getInstance().getCurrentUser().getUid();
+
+ eventPic = (ImageView) findViewById(R.id.picture);
+
+ StorageReference storageRef = FirebaseStorage.getInstance().getReference().child(getIntent().getExtras().getString("firebasePath"));
+ storageRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener()
+ {
+ @Override
+ public void onSuccess(final Uri downloadUrl)
+ {
+
+
+ AsyncTask asyncTask = new AsyncTask() {
+
+ @Override
+ protected Bitmap doInBackground(Void... params) {
+ return getBitmapFromURL(downloadUrl.toString());
+ }
+
+ public Bitmap getBitmapFromURL(String src) {
+ try {
+ URL url = new URL(src);
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setDoInput(true);
+ connection.connect();
+ InputStream input = connection.getInputStream();
+ Bitmap bitmap = BitmapFactory.decodeStream(input);
+ return bitmap;
+ } catch (IOException e) {
+ // Log exception
+ return null;
+ }
+ }
+
+
+ @Override
+ protected void onPostExecute(Bitmap result) {
+ eventPic.setImageBitmap(result);
+ Palette.from(result).generate(new Palette.PaletteAsyncListener() {
+ public void onGenerated(Palette p) {
+ Palette.Swatch vibrant = p.getVibrantSwatch();
+ if (vibrant != null) {
+ // Set the background color of a layout based on the vibrant color
+ getWindow().getDecorView().setBackgroundColor(vibrant.getRgb());
+
+ }
+ }
+ });
+ }
+ }.execute();
+
+
+ }
+
+ });
+
+
+
+
+
+ eventName = (TextView) findViewById(R.id.eventName);
+ eventName.setText(getIntent().getExtras().getString("title"));
+
+ date = (TextView) findViewById(R.id.textView);
+ date.setText(getIntent().getExtras().getString("date"));
+
+ author = (TextView) findViewById(R.id.textView2);
+ author.setText(getIntent().getExtras().getString("author"));
+
+ description = (TextView) findViewById(R.id.textView3);
+ description.setText(getIntent().getExtras().getString("description"));
+
+ numInterested = (Button) findViewById(R.id.button);
+ numInterested.setText("Interested: " + getIntent().getExtras().getInt("interested"));
+
+
+ numInterested.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+ dbRef.child("Users").addValueEventListener(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot dataSnapshot) {
+ interestedName = new ArrayList();
+ interestedEmail = new ArrayList();
+ for(DataSnapshot dsp: dataSnapshot.getChildren()) {
+ HashMap map = (HashMap) dsp.getValue();
+ if(interestedUid.contains(map.get("uid"))){
+ interestedName.add((String) map.get("name"));
+ interestedEmail.add((String) map.get("email"));
+ }
+ }
+ }
+
+ @Override
+ public void onCancelled(DatabaseError databaseError) {
+
+ }
+ });
+
+ Intent intent = new Intent(getApplicationContext(),InterestedActivity.class);
+ intent.putExtra("interestedName", interestedName);
+ intent.putExtra("interestedEmail", interestedEmail);
+ startActivity(intent);
+ }
+ });
+ interested = (CheckBox) findViewById(R.id.interested);
+ dbRef.child("Socials").addValueEventListener(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot dataSnapshot) {
+ for(DataSnapshot dsp: dataSnapshot.getChildren()) {
+ HashMap map = (HashMap) dsp.getValue();
+ ArrayList listInterested = (ArrayList) map.get("interested");
+ if(listInterested == null){
+ listInterested = new ArrayList();
+ }
+ if(map.get("name").equals(eventName.getText().toString())){
+ if(listInterested.contains(uid)) {
+ interested.setChecked(true);
+ numInterested.setText("Interested: " + listInterested.size());
+ }
+ interestedUid = listInterested;
+ }
+ }
+ }
+
+ @Override
+ public void onCancelled(DatabaseError databaseError) {
+
+ }
+ });
+
+
+ dbRef.child("Users").addValueEventListener(new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot dataSnapshot) {
+ interestedName = new ArrayList();
+ interestedEmail = new ArrayList();
+ for(DataSnapshot dsp: dataSnapshot.getChildren()) {
+ HashMap map = (HashMap) dsp.getValue();
+ if(interestedUid.contains(map.get("uid"))){
+ interestedName.add((String) map.get("name"));
+ interestedEmail.add((String) map.get("email"));
+ }
+ }
+ }
+
+ @Override
+ public void onCancelled(DatabaseError databaseError) {
+
+ }
+ });
+
+ interested.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ if(isChecked){
+ ValueEventListener postListener = new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot dataSnapshot) {
+ for(DataSnapshot dsp: dataSnapshot.getChildren()){
+ HashMap map = (HashMap) dsp.getValue();
+ ArrayList listInterested = (ArrayList) map.get("interested");
+ if(listInterested == null){
+ listInterested = new ArrayList();
+ }
+
+ if (map.get("name").equals(eventName.getText().toString()) && !listInterested.contains(uid)) {
+ listInterested.add(uid);
+ Map newMap = new HashMap();
+ newMap.put("name", map.get("name"));
+ newMap.put("author", map.get("author"));
+ newMap.put("date", map.get("date"));
+ newMap.put("description", map.get("description"));
+ newMap.put("path", map.get("path"));
+ newMap.put("interested", listInterested);
+ dbRef.child("Socials").child(dsp.getKey()).setValue(newMap);
+
+ }
+
+ }
+
+ }
+ @Override
+ public void onCancelled(DatabaseError databaseError) {
+ Log.w("TAG", "loadPost:onCancelled", databaseError.toException());
+ }
+
+ };
+ dbRef.child("Socials").addValueEventListener(postListener);
+ }
+ else {
+ Log.d("test", "unchecked");
+ ValueEventListener postListener = new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot dataSnapshot) {
+ for(DataSnapshot dsp: dataSnapshot.getChildren()){
+ HashMap map = (HashMap) dsp.getValue();
+ if (map.get("name").equals(eventName.getText().toString())) {
+ Log.d("test", "inside social");
+ ArrayList listInterested = (ArrayList) map.get("interested");
+ if(listInterested==null){
+ listInterested = new ArrayList();
+ }
+ for (int i = 0; i < listInterested.size(); i++) {
+ Log.d("test", "inside forloop");
+ if (listInterested.get(i).equals(uid)) {
+ listInterested.remove(i);
+ Log.d("test", "removed from interested");
+ break;
+ }
+ }
+ if(listInterested==null){
+ listInterested = new ArrayList();
+ }
+ Map newMap = new HashMap();
+ newMap.put("name", map.get("name"));
+ newMap.put("author", map.get("author"));
+ newMap.put("date", map.get("date"));
+ newMap.put("description", map.get("description"));
+ newMap.put("path", map.get("path"));
+ newMap.put("interested", listInterested);
+ dbRef.child("Socials").child(dsp.getKey()).setValue(newMap);
+ Log.d("test", "database changed");
+ break;
+ }
+
+ }
+
+ }
+ @Override
+ public void onCancelled(DatabaseError databaseError) {
+ Log.w("TAG", "loadPost:onCancelled", databaseError.toException());
+ }
+
+ };
+ dbRef.child("Socials").addValueEventListener(postListener);
+
+ }
+
+
+ }
+ });
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.activity_details, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.logout:
+ mAuth.signOut();
+ startActivity(new Intent(this, MainActivity.class));
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/FeedActivity.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/FeedActivity.java
new file mode 100644
index 0000000..5453ae9
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/FeedActivity.java
@@ -0,0 +1,131 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.design.widget.FloatingActionButton;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.database.DataSnapshot;
+import com.google.firebase.database.DatabaseError;
+import com.google.firebase.database.DatabaseReference;
+import com.google.firebase.database.FirebaseDatabase;
+import com.google.firebase.database.ValueEventListener;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public class FeedActivity extends AppCompatActivity {
+
+ private FirebaseAuth mAuth;
+ private RecyclerView rv;
+ public FeedAdapter adapter;
+ public ArrayList socials = new ArrayList();
+ //private FloatingActionButton logout;
+ private FloatingActionButton createSocial;
+ private DatabaseReference mDatabase;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_feed);
+
+ SocialsList socialsList = new SocialsList();
+ socials = socialsList.getSocials();
+ //logout = (FloatingActionButton) findViewById(R.id.logout);
+ createSocial = (FloatingActionButton) findViewById(R.id.createNew);
+
+
+ mDatabase = FirebaseDatabase.getInstance().getReference();
+
+
+ rv = (RecyclerView) findViewById(R.id.rv);
+ rv.setLayoutManager(new LinearLayoutManager(this));
+ adapter = new FeedAdapter(getApplicationContext(), socials);
+ rv.setAdapter(adapter);
+
+ ValueEventListener postListener = new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot dataSnapshot) {
+ socials = new ArrayList();
+
+ for(DataSnapshot dsp: dataSnapshot.getChildren()){
+ HashMap map = (HashMap) dsp.getValue();
+ String name = (String) map.get("name");
+ String author = (String) map.get("author");
+ String description = (String) map.get("description");
+ String date = (String) map.get("date");
+ String firebasePath = (String) map.get("path");
+ ArrayList interested = (ArrayList) map.get("interested");
+ if(interested == null){
+ interested = new ArrayList();
+ }
+ SocialsList.Social social = new SocialsList.Social(name, author, description, date, firebasePath);
+ social.setInterested(interested);
+ socials.add(social);
+ //issue is that were getting string values instead of social classes, also how do i new socials, using set value in create new social just replaces values
+ }
+ adapter.socials = socials;
+ adapter.notifyDataSetChanged();
+ rv.setAdapter(adapter);
+ }
+
+
+ @Override
+ public void onCancelled(DatabaseError databaseError) {
+ Log.w("TAG", "loadPost:onCancelled", databaseError.toException());
+ }
+
+ };
+ mDatabase.child("Socials").addValueEventListener(postListener);
+
+
+
+ mAuth = FirebaseAuth.getInstance();
+// logout.setOnClickListener(new View.OnClickListener() {
+// @Override
+// public void onClick(View v) {
+// mAuth.signOut();
+// startActivity(new Intent(FeedActivity.this, MainActivity.class));
+// }
+// });
+
+ createSocial.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(FeedActivity.this, CreateNewSocial.class);
+ intent.putExtra("numSocials", socials.size());
+ startActivity(intent);
+ }
+ });
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.activity_details, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.logout:
+ mAuth.signOut();
+ startActivity(new Intent(this, MainActivity.class));
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/FeedAdapter.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/FeedAdapter.java
new file mode 100644
index 0000000..1978cb7
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/FeedAdapter.java
@@ -0,0 +1,163 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+import com.google.android.gms.tasks.OnSuccessListener;
+import com.google.firebase.database.DataSnapshot;
+import com.google.firebase.database.DatabaseError;
+import com.google.firebase.database.DatabaseReference;
+import com.google.firebase.database.FirebaseDatabase;
+import com.google.firebase.database.ValueEventListener;
+import com.google.firebase.storage.FirebaseStorage;
+import com.google.firebase.storage.StorageReference;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
+
+/**
+ * Created by KJ on 10/4/16.
+ */
+
+public class FeedAdapter extends RecyclerView.Adapter {
+
+ private Context context;
+ public ArrayList socials = new ArrayList<>();
+ private DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();;
+
+
+ public FeedAdapter(Context context, ArrayList socials) {
+ this.context = context;
+ this.socials = socials;
+ }
+
+ @Override
+ public int getItemCount() {
+ return socials.size();
+ }
+
+ /* In simplified terms, a ViewHolder is an object that holds the pointers to the views in each
+ each row. What does that mean? Every row has a TextView, ImageView, and CheckBox. Each row has
+ a ViewHolder, and that ViewHolder holder these 3 views in it (hence "view holder").
+ This function returns a single ViewHolder; it is called once for every row.
+ */
+ @Override
+ public CustomViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+// This "inflates" the views, using the layout R.layout.row_view
+ View view;
+ view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_view, parent, false);
+ return new CustomViewHolder(view);
+ }
+
+ /* This function takes the previously made ViewHolder and uses it to actually display the
+ data on the screen. Remember how the holder contains (pointers to) the 3 views? By doing, for
+ example, "holder.imageView" we are accessing the imageView for that row and setting the
+ ImageResource to be the corresponding image for that subject.
+ */
+ @Override
+ public void onBindViewHolder(final CustomViewHolder holder, int position) {
+ SocialsList.Social social = socials.get(position);
+ holder.titleView.setText(social.title);
+ holder.authorView.setText(social.author);
+ if(social.interested == null){
+ social.interested = new ArrayList<>();
+ }
+
+ holder.numinterestedView.setText(Integer.toString(social.interested.size()));
+
+ StorageReference storageRef = FirebaseStorage.getInstance().getReference().child(socials.get(position).firebasePath);
+ storageRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener()
+ {
+ @Override
+ public void onSuccess(Uri downloadUrl)
+ {
+ Glide.with(context).load(downloadUrl).into(holder.imageView);
+ }
+
+ });
+
+
+
+
+ }
+
+
+ class CustomViewHolder extends RecyclerView.ViewHolder {
+ TextView titleView;
+ ImageView imageView;
+ TextView authorView;
+ TextView numinterestedView;
+ ArrayList interestedName = new ArrayList();
+ ArrayList interestedEmail = new ArrayList();
+ String firebasePath;
+
+ public CustomViewHolder (View view) {
+ super(view);
+ this.titleView = (TextView) view.findViewById(R.id.title);
+ this.imageView = (ImageView) view.findViewById(R.id.eventpic);
+ this.authorView = (TextView) view.findViewById(R.id.author);
+ this.numinterestedView = (TextView) view.findViewById(R.id.number);
+
+ view.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ /*Get adapter position is getting the number of the row that was clicked,
+ starting at 0
+ */
+ final SocialsList.Social s = socials.get(getAdapterPosition());
+
+
+ Intent intent = new Intent(context, DetailsActivity.class);
+
+ ValueEventListener postListener = new ValueEventListener() {
+ @Override
+ public void onDataChange(DataSnapshot dataSnapshot) {
+ ArrayList interested = s.getInterested();
+ for(DataSnapshot dsp: dataSnapshot.getChildren()){
+ HashMap map = (HashMap) dsp.getValue();
+ if (interested.contains(map.get("uid"))) {
+ String name = (String) map.get("name");
+ String email = (String) map.get("email");
+ interestedName.add(name);
+ interestedEmail.add(email);
+
+ }
+
+ }
+
+ }
+ @Override
+ public void onCancelled(DatabaseError databaseError) {
+ Log.w("TAG", "loadPost:onCancelled", databaseError.toException());
+ }
+
+ };
+ mDatabase.child("Users").addValueEventListener(postListener);
+
+ intent.putExtra("title", s.title);
+ intent.putExtra("author", s.author);
+ intent.putExtra("description", s.description);
+ intent.putExtra("date", s.date);
+ intent.putExtra("interested", s.interested.size());
+ intent.putExtra("firebasePath", s.firebasePath);
+
+ intent.putStringArrayListExtra("interestedName", interestedName);
+ intent.putStringArrayListExtra("interestedEmail", interestedEmail);
+ intent.addFlags(FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(intent);
+ }
+ });
+ }
+ }
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/InterestedActivity.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/InterestedActivity.java
new file mode 100644
index 0000000..8b56d91
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/InterestedActivity.java
@@ -0,0 +1,56 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.Menu;
+import android.view.MenuItem;
+
+import com.google.firebase.auth.FirebaseAuth;
+
+import java.util.ArrayList;
+
+public class InterestedActivity extends AppCompatActivity {
+ private ArrayList interestedName;
+ private ArrayList interestedEmail;
+ private FirebaseAuth mAuth;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_interested);
+
+ RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
+ recyclerView.setLayoutManager(new LinearLayoutManager(this));
+
+
+ interestedName = getIntent().getStringArrayListExtra("interestedName");
+ interestedEmail = getIntent().getStringArrayListExtra("interestedEmail");
+
+ InterestedAdapter interestedAdapter = new InterestedAdapter(getApplicationContext(), interestedName, interestedEmail);
+
+ recyclerView.setAdapter(interestedAdapter);
+
+ mAuth = FirebaseAuth.getInstance();
+
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.activity_details, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.logout:
+ mAuth.signOut();
+ startActivity(new Intent(this, MainActivity.class));
+ }
+ return super.onOptionsItemSelected(item);
+ }
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/InterestedAdapter.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/InterestedAdapter.java
new file mode 100644
index 0000000..69180e9
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/InterestedAdapter.java
@@ -0,0 +1,72 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Context;
+import android.support.annotation.NonNull;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+/**
+ * Created by victorsun on 10/5/16.
+ */
+
+public class InterestedAdapter extends RecyclerView.Adapter {
+ private Context context;
+ public ArrayList names;
+ public ArrayList emails;
+
+ public InterestedAdapter(Context context, @NonNull ArrayList interestedName, @NonNull ArrayList interestedEmail) {
+ this.context = context;
+ names = interestedName;
+ emails = interestedEmail;
+ }
+
+
+ /* In simplified terms, a ViewHolder is an object that holds the pointers to the views in each
+ each row. What does that mean? Every row has a TextView, ImageView, and CheckBox. Each row has
+ a ViewHolder, and that ViewHolder holder these 3 views in it (hence "view holder").
+ This function returns a single ViewHolder; it is called once for every row.
+ */
+ @Override
+ public CustomViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+
+//
+ View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_view_members, parent, false);
+ return new CustomViewHolder(view);
+ }
+
+ /* This function takes the previously made ViewHolder and uses it to actually display the
+ data on the screen. Remember how the holder contains (pointers to) the 3 views? By doing, for
+ example, "holder.imageView" we are accessing the imageView for that row and setting the
+ ImageResource to be the corresponding image for that subject.
+ */
+ @Override
+ public void onBindViewHolder(CustomViewHolder holder, int position) {
+ holder.name.setText(names.get(position));
+ holder.email.setText(emails.get(position));
+ }
+
+ public int getItemCount() {
+ return names.size();
+ }
+
+ class CustomViewHolder extends RecyclerView.ViewHolder {
+ TextView name, email;
+
+ public CustomViewHolder(View view) {
+ super(view);
+ this.name = (TextView) view.findViewById(R.id.name);
+ this.email = (TextView) view.findViewById(R.id.email);
+
+ /*Think about what we said in the comment above onCreateViewHolder to determine the
+ purpose of the ViewHolder. Does it make sense why we are doing this in the constructor?
+ */
+
+ }
+ }
+
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/MainActivity.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/MainActivity.java
new file mode 100644
index 0000000..ceaa9f3
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/MainActivity.java
@@ -0,0 +1,106 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.Task;
+import com.google.firebase.auth.AuthResult;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+
+public class MainActivity extends AppCompatActivity {
+
+ private FirebaseAuth mAuth;
+ private FirebaseAuth.AuthStateListener mAuthListener;
+ private FirebaseUser user;
+
+ private EditText email;
+ private EditText password;
+ private Button login;
+ private TextView signup;
+
+ // private String TAG =
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ email = (EditText) findViewById(R.id.email);
+ password = (EditText) findViewById(R.id.password);
+ login = (Button) findViewById(R.id.login);
+ signup = (TextView) findViewById(R.id.signup);
+
+ mAuth = FirebaseAuth.getInstance();
+ mAuthListener = new FirebaseAuth.AuthStateListener() {
+ @Override
+ public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
+ user = firebaseAuth.getCurrentUser();
+ // If user is already signed in, go to the feed activity
+ if (user != null) {
+ startActivity(new Intent(MainActivity.this, FeedActivity.class));
+ }
+
+ }
+ };
+ //logout();
+ login.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ signIn();
+ }
+ });
+
+ signup.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(new Intent(MainActivity.this, SignupActivity.class));
+ }
+ });
+
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ mAuth.addAuthStateListener(mAuthListener);
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ if (mAuthListener != null) {
+ mAuth.removeAuthStateListener(mAuthListener);
+ }
+ }
+
+ private void signIn() {
+ String em = email.getText().toString();
+ String pass = password.getText().toString();
+ if(em.length()==0 || pass.length()==0){
+ Toast.makeText(MainActivity.this, "Sign in problem", Toast.LENGTH_LONG).show();
+ return;
+ }
+ mAuth.signInWithEmailAndPassword(em, pass).addOnCompleteListener(new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+ if (!task.isSuccessful()) {
+ Toast.makeText(MainActivity.this, "Sign in problem", Toast.LENGTH_LONG).show();
+ }
+ }
+ });
+ }
+
+ private void logout() {
+ mAuth.signOut();
+ }
+
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/SignupActivity.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/SignupActivity.java
new file mode 100644
index 0000000..6e1ace4
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/SignupActivity.java
@@ -0,0 +1,83 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.Task;
+import com.google.firebase.auth.AuthResult;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.database.DatabaseReference;
+import com.google.firebase.database.FirebaseDatabase;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class SignupActivity extends AppCompatActivity {
+
+ private EditText name;
+ private EditText email;
+ private EditText password;
+ private Button signup;
+
+ private FirebaseAuth mAuth;
+
+ private DatabaseReference mDatabase;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_signup);
+
+ name = (EditText) findViewById(R.id.name);
+ email = (EditText) findViewById(R.id.email);
+ password = (EditText) findViewById(R.id.password);
+ signup = (Button) findViewById(R.id.signup);
+
+ mAuth = FirebaseAuth.getInstance();
+ mDatabase = FirebaseDatabase.getInstance().getReference();
+
+ signup.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ signup();
+ }
+ });
+ }
+
+ private void signup() {
+ final String n = name.getText().toString();
+ final String em = email.getText().toString();
+ String pass = password.getText().toString();
+
+ if(n.length()==0 || em.length()==0 || password.length()==0){
+ Toast.makeText(SignupActivity.this, "Sign up failed, please fill in all blanks.", Toast.LENGTH_LONG).show();
+ return;
+ }
+ final User user = new User(n, em);
+ mAuth.createUserWithEmailAndPassword(em, pass).addOnCompleteListener(this, new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+ if (task.isSuccessful()) {
+ String uid = mAuth.getCurrentUser().getUid();
+ Map post = new HashMap<>();
+ post.put("uid", uid);
+ post.put("name", n);
+ post.put("email", em);
+ mDatabase.child("Users").push().setValue(post);
+ startActivity(new Intent(SignupActivity.this, FeedActivity.class));
+ } else if (!(task.isSuccessful())) {
+ Toast.makeText(SignupActivity.this, "Sign up problem", Toast.LENGTH_LONG).show();
+ }
+ }
+ });
+
+ }
+
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/SocialsList.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/SocialsList.java
new file mode 100644
index 0000000..c47f3a4
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/SocialsList.java
@@ -0,0 +1,59 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import java.util.ArrayList;
+
+/**
+ * Created by KJ on 10/4/16.
+ */
+
+public class SocialsList {
+
+ public ArrayList socials;
+
+ public SocialsList() {
+ socials = new ArrayList<>();
+ }
+
+ public void addSocial(String title, String author, String descrip, String date, String firebasePath) {
+ Social social = new Social(title, author, descrip, date, firebasePath);
+ socials.add(social);
+ }
+
+ public ArrayList getSocials() {
+ return socials;
+ }
+
+
+ public static class Social {
+ public String title;
+ public String author;
+ public String description;
+ public ArrayList interested;
+ public String date;
+ public String firebasePath;
+
+ public Social(String title, String author, String description, String date, String firebasePath) {
+ this.title = title;
+ this.author = author;
+ this.description = description;
+ this.date = date;
+ this.firebasePath = firebasePath;
+ this.interested = new ArrayList<>();
+ }
+
+ public void setInterested(ArrayList list) {
+ interested = list;
+ }
+
+ public void addInterested(String uid) {
+ interested.add(uid);
+ }
+
+ public ArrayList getInterested(){
+ return interested;
+ }
+ }
+
+
+
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/SplashActivity.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/SplashActivity.java
new file mode 100644
index 0000000..6f7a114
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/SplashActivity.java
@@ -0,0 +1,18 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import android.content.Intent;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+
+public class SplashActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_splash);
+
+ Intent intent = new Intent(this, MainActivity.class);
+ startActivity(intent);
+ finish();
+ }
+}
diff --git a/app/src/main/java/com/mdb/training/katharine/mdbsocials/User.java b/app/src/main/java/com/mdb/training/katharine/mdbsocials/User.java
new file mode 100644
index 0000000..a64d22d
--- /dev/null
+++ b/app/src/main/java/com/mdb/training/katharine/mdbsocials/User.java
@@ -0,0 +1,22 @@
+package com.mdb.training.katharine.mdbsocials;
+
+/**
+ * Created by KJ on 10/4/16.
+ */
+
+public class User {
+
+ public String name;
+ public String email;
+ //public String password;
+
+ public User() {
+
+ }
+
+ public User(String name, String email) {
+ this.name = name;
+ this.email = email;
+// this.password = password;
+ }
+}
diff --git a/app/src/main/res/drawable/mdblogo.png b/app/src/main/res/drawable/mdblogo.png
new file mode 100644
index 0000000..566ae01
Binary files /dev/null and b/app/src/main/res/drawable/mdblogo.png differ
diff --git a/app/src/main/res/drawable/splashscreen.xml b/app/src/main/res/drawable/splashscreen.xml
new file mode 100644
index 0000000..325530e
--- /dev/null
+++ b/app/src/main/res/drawable/splashscreen.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+-
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_create_new_social.xml b/app/src/main/res/layout/activity_create_new_social.xml
new file mode 100644
index 0000000..efea513
--- /dev/null
+++ b/app/src/main/res/layout/activity_create_new_social.xml
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_details.xml b/app/src/main/res/layout/activity_details.xml
new file mode 100644
index 0000000..e8ec9b6
--- /dev/null
+++ b/app/src/main/res/layout/activity_details.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_feed.xml b/app/src/main/res/layout/activity_feed.xml
new file mode 100644
index 0000000..394b2ad
--- /dev/null
+++ b/app/src/main/res/layout/activity_feed.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_interested.xml b/app/src/main/res/layout/activity_interested.xml
new file mode 100644
index 0000000..b78dab3
--- /dev/null
+++ b/app/src/main/res/layout/activity_interested.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..6a2666e
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_signup.xml b/app/src/main/res/layout/activity_signup.xml
new file mode 100644
index 0000000..62569d3
--- /dev/null
+++ b/app/src/main/res/layout/activity_signup.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_splash.xml b/app/src/main/res/layout/activity_splash.xml
new file mode 100644
index 0000000..0eed64d
--- /dev/null
+++ b/app/src/main/res/layout/activity_splash.xml
@@ -0,0 +1,13 @@
+
+
+
+
diff --git a/app/src/main/res/layout/content_details.xml b/app/src/main/res/layout/content_details.xml
new file mode 100644
index 0000000..2f166cf
--- /dev/null
+++ b/app/src/main/res/layout/content_details.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/row_view.xml b/app/src/main/res/layout/row_view.xml
new file mode 100644
index 0000000..874404b
--- /dev/null
+++ b/app/src/main/res/layout/row_view.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/row_view_members.xml b/app/src/main/res/layout/row_view_members.xml
new file mode 100644
index 0000000..d9414a3
--- /dev/null
+++ b/app/src/main/res/layout/row_view_members.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/activity_details.xml b/app/src/main/res/menu/activity_details.xml
new file mode 100644
index 0000000..e4c756b
--- /dev/null
+++ b/app/src/main/res/menu/activity_details.xml
@@ -0,0 +1,10 @@
+
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..aee44e1
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml
new file mode 100644
index 0000000..dbbdd40
--- /dev/null
+++ b/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..d44e37c
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,8 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+ #1E90F0
+ #0D47A1
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..965aa37
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,8 @@
+
+
+ 16dp
+ 16dp
+ 180dp
+ 16dp
+ 16dp
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..18f681e
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,108 @@
+
+ MDBSocials
+
+
+ Email
+ Password (optional)
+ Sign in or register
+ Sign in
+ This email address is invalid
+ This password is too short
+ This password is incorrect
+ This field is required
+ "Contacts permissions are needed for providing email
+ completions."
+
+ DetailsActivity
+
+ "Material is the metaphor.\n\n"
+
+ "A material metaphor is the unifying theory of a rationalized space and a system of motion."
+ "The material is grounded in tactile reality, inspired by the study of paper and ink, yet "
+ "technologically advanced and open to imagination and magic.\n"
+ "Surfaces and edges of the material provide visual cues that are grounded in reality. The "
+ "use of familiar tactile attributes helps users quickly understand affordances. Yet the "
+ "flexibility of the material creates new affordances that supercede those in the physical "
+ "world, without breaking the rules of physics.\n"
+ "The fundamentals of light, surface, and movement are key to conveying how objects move, "
+ "interact, and exist in space and in relation to each other. Realistic lighting shows "
+ "seams, divides space, and indicates moving parts.\n\n"
+
+ "Bold, graphic, intentional.\n\n"
+
+ "The foundational elements of print based design typography, grids, space, scale, color, "
+ "and use of imagery guide visual treatments. These elements do far more than please the "
+ "eye. They create hierarchy, meaning, and focus. Deliberate color choices, edge to edge "
+ "imagery, large scale typography, and intentional white space create a bold and graphic "
+ "interface that immerse the user in the experience.\n"
+ "An emphasis on user actions makes core functionality immediately apparent and provides "
+ "waypoints for the user.\n\n"
+
+ "Motion provides meaning.\n\n"
+
+ "Motion respects and reinforces the user as the prime mover. Primary user actions are "
+ "inflection points that initiate motion, transforming the whole design.\n"
+ "All action takes place in a single environment. Objects are presented to the user without "
+ "breaking the continuity of experience even as they transform and reorganize.\n"
+ "Motion is meaningful and appropriate, serving to focus attention and maintain continuity. "
+ "Feedback is subtle yet clear. Transitions are efficient yet coherent.\n\n"
+
+ "3D world.\n\n"
+
+ "The material environment is a 3D space, which means all objects have x, y, and z "
+ "dimensions. The z-axis is perpendicularly aligned to the plane of the display, with the "
+ "positive z-axis extending towards the viewer. Every sheet of material occupies a single "
+ "position along the z-axis and has a standard 1dp thickness.\n"
+ "On the web, the z-axis is used for layering and not for perspective. The 3D world is "
+ "emulated by manipulating the y-axis.\n\n"
+
+ "Light and shadow.\n\n"
+
+ "Within the material environment, virtual lights illuminate the scene. Key lights create "
+ "directional shadows, while ambient light creates soft shadows from all angles.\n"
+ "Shadows in the material environment are cast by these two light sources. In Android "
+ "development, shadows occur when light sources are blocked by sheets of material at "
+ "various positions along the z-axis. On the web, shadows are depicted by manipulating the "
+ "y-axis only. The following example shows the card with a height of 6dp.\n\n"
+
+ "Resting elevation.\n\n"
+
+ "All material objects, regardless of size, have a resting elevation, or default elevation "
+ "that does not change. If an object changes elevation, it should return to its resting "
+ "elevation as soon as possible.\n\n"
+
+ "Component elevations.\n\n"
+
+ "The resting elevation for a component type is consistent across apps (e.g., FAB elevation "
+ "does not vary from 6dp in one app to 16dp in another app).\n"
+ "Components may have different resting elevations across platforms, depending on the depth "
+ "of the environment (e.g., TV has a greater depth than mobile or desktop).\n\n"
+
+ "Responsive elevation and dynamic elevation offsets.\n\n"
+
+ "Some component types have responsive elevation, meaning they change elevation in response "
+ "to user input (e.g., normal, focused, and pressed) or system events. These elevation "
+ "changes are consistently implemented using dynamic elevation offsets.\n"
+ "Dynamic elevation offsets are the goal elevation that a component moves towards, relative "
+ "to the component’s resting state. They ensure that elevation changes are consistent "
+ "across actions and component types. For example, all components that lift on press have "
+ "the same elevation change relative to their resting elevation.\n"
+ "Once the input event is completed or cancelled, the component will return to its resting "
+ "elevation.\n\n"
+
+ "Avoiding elevation interference.\n\n"
+
+ "Components with responsive elevations may encounter other components as they move between "
+ "their resting elevations and dynamic elevation offsets. Because material cannot pass "
+ "through other material, components avoid interfering with one another any number of ways, "
+ "whether on a per component basis or using the entire app layout.\n"
+ "On a component level, components can move or be removed before they cause interference. "
+ "For example, a floating action button (FAB) can disappear or move off screen before a "
+ "user picks up a card, or it can move if a snackbar appears.\n"
+ "On the layout level, design your app layout to minimize opportunities for interference. "
+ "For example, position the FAB to one side of stream of a cards so the FAB won’t interfere "
+ "when a user tries to pick up one of cards.\n\n"
+
+ Settings
+ Date
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..14a4f33
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/test/java/com/mdb/training/katharine/mdbsocials/ExampleUnitTest.java b/app/src/test/java/com/mdb/training/katharine/mdbsocials/ExampleUnitTest.java
new file mode 100644
index 0000000..78d36e4
--- /dev/null
+++ b/app/src/test/java/com/mdb/training/katharine/mdbsocials/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.mdb.training.katharine.mdbsocials;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..c46a47c
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,25 @@
+// 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:2.2.0'
+ classpath 'com.google.gms:google-services:3.0.0'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
+
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..aac7c9b
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,17 @@
+# 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.
+org.gradle.jvmargs=-Xmx1536m
+
+# 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
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..04e285f
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Dec 28 10:00:20 PST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/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
+
+# 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\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+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"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # 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/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/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/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app'