diff --git a/.DS_Store b/.DS_Store
index f260456..4d55317 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/MemeProject/.idea/compiler.xml b/MemeProject/.idea/compiler.xml
index 217af47..9a8b7e5 100644
--- a/MemeProject/.idea/compiler.xml
+++ b/MemeProject/.idea/compiler.xml
@@ -19,5 +19,4 @@
-
-
+
\ No newline at end of file
diff --git a/MemeProject/.idea/encodings.xml b/MemeProject/.idea/encodings.xml
deleted file mode 100644
index e206d70..0000000
--- a/MemeProject/.idea/encodings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/MemeProject/.idea/gradle.xml b/MemeProject/.idea/gradle.xml
index 736c7b5..1bbc21d 100644
--- a/MemeProject/.idea/gradle.xml
+++ b/MemeProject/.idea/gradle.xml
@@ -5,6 +5,7 @@
+
-
-
+
\ No newline at end of file
diff --git a/MemeProject/.idea/misc.xml b/MemeProject/.idea/misc.xml
index d415385..4684197 100644
--- a/MemeProject/.idea/misc.xml
+++ b/MemeProject/.idea/misc.xml
@@ -3,6 +3,13 @@
+
+
+
+
+
+
+
@@ -13,7 +20,7 @@
-
+
@@ -35,5 +42,4 @@
-
-
+
\ No newline at end of file
diff --git a/MemeProject/.idea/modules.xml b/MemeProject/.idea/modules.xml
index db189d3..d953495 100644
--- a/MemeProject/.idea/modules.xml
+++ b/MemeProject/.idea/modules.xml
@@ -6,5 +6,4 @@
-
-
+
\ No newline at end of file
diff --git a/MemeProject/.idea/scopes/scope_settings.xml b/MemeProject/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/MemeProject/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/MemeProject/.idea/vcs.xml b/MemeProject/.idea/vcs.xml
index def6a6a..6564d52 100644
--- a/MemeProject/.idea/vcs.xml
+++ b/MemeProject/.idea/vcs.xml
@@ -3,5 +3,4 @@
-
-
+
\ No newline at end of file
diff --git a/MemeProject/MemeProject.iml b/MemeProject/MemeProject.iml
index 29deca7..9a5441c 100644
--- a/MemeProject/MemeProject.iml
+++ b/MemeProject/MemeProject.iml
@@ -4,6 +4,7 @@
+
@@ -15,5 +16,4 @@
-
-
+
\ No newline at end of file
diff --git a/MemeProject/app/app.iml b/MemeProject/app/app.iml
index eb0313a..a3753c9 100644
--- a/MemeProject/app/app.iml
+++ b/MemeProject/app/app.iml
@@ -12,8 +12,9 @@
-
+
+
@@ -83,11 +84,13 @@
-
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/MemeProject/app/build.gradle b/MemeProject/app/build.gradle
index 77da775..7c52543 100644
--- a/MemeProject/app/build.gradle
+++ b/MemeProject/app/build.gradle
@@ -22,4 +22,6 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
+ compile 'com.squareup.picasso:picasso:2.5.2'
+ compile 'com.squareup.retrofit:retrofit:1.9.0'
}
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/ApplyFilters.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/ApplyFilters.java
old mode 100644
new mode 100755
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/ColorPicker.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/ColorPicker.java
old mode 100644
new mode 100755
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/ConvolutionMatrix.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/ConvolutionMatrix.java
old mode 100644
new mode 100755
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/CustomArrayAdapter.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/CustomArrayAdapter.java
old mode 100644
new mode 100755
index b462b33..129a880
--- a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/CustomArrayAdapter.java
+++ b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/CustomArrayAdapter.java
@@ -8,8 +8,13 @@
import android.widget.ImageView;
import android.widget.TextView;
+import com.squareup.picasso.Picasso;
+
+import java.util.ArrayList;
import java.util.List;
+import madelyntav.c4q.nyc.memeproject.Meme_API.Meme;
+
/**
* Created by kadeemmaragh on 6/4/15.
*/
@@ -17,18 +22,33 @@ public class CustomArrayAdapter extends ArrayAdapter {
List memeNames= null;
List memeImages = null;
+ List memeUrls = null;
private static LayoutInflater inflater = null;
+ private Context context;
CustomArrayAdapter(Context context, List names, List images) {
super(context, R.layout.list_item, names);
memeNames = names;
memeImages = images;
+ this.context = context.getApplicationContext();
+
+ inflater = (LayoutInflater) context.
+ getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
+ }
+
+ CustomArrayAdapter(Context context, List names, List imageUrls, boolean api) {
+ super(context, R.layout.list_item, names);
+ memeNames = names;
+ memeUrls = imageUrls;
+ this.context = context.getApplicationContext();
inflater = (LayoutInflater) context.
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
+
@Override
public View getView(int position, View convertView,
ViewGroup parent) {
@@ -47,12 +67,14 @@ private View newView(ViewGroup parent) {
private void bindView(int position, View row) {
TextView label=(TextView)row.findViewById(R.id.memeName);
-
- label.setText(memeNames.get(position));
-
ImageView icon=(ImageView)row.findViewById(R.id.memeImage);
+ label.setText(memeNames.get(position));
- icon.setImageResource(memeImages.get(position));
+ if(memeUrls == null) {
+ Picasso.with(context).load(memeImages.get(position)).resize(250, 250).centerCrop().into(icon);
+ }else{
+ Picasso.with(context).load(memeUrls.get(position)).resize(250, 250).centerCrop().into(icon);
+ }
}
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/EditPhoto.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/EditPhoto.java
old mode 100644
new mode 100755
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/MainActivity.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/MainActivity.java
old mode 100644
new mode 100755
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/MemeList.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/MemeList.java
old mode 100644
new mode 100755
index 4cff6ef..44dd6db
--- a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/MemeList.java
+++ b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/MemeList.java
@@ -1,27 +1,40 @@
package madelyntav.c4q.nyc.memeproject;
import android.app.Activity;
-import android.content.ContentResolver;
import android.content.Intent;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteException;
import android.net.Uri;
+import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.Toast;
-import java.io.InputStream;
import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.List;
+
+import madelyntav.c4q.nyc.memeproject.Meme_API.Meme;
+import madelyntav.c4q.nyc.memeproject.Meme_API.MemeTemplate;
+import madelyntav.c4q.nyc.memeproject.Meme_API.MemeTemplateAPI;
+import madelyntav.c4q.nyc.memeproject.Meme_DB.MySQLiteOpenHelper;
+import retrofit.Callback;
+import retrofit.RestAdapter;
+import retrofit.RetrofitError;
+import retrofit.client.Response;
/**
* Created by kadeemmaragh on 6/5/15.
*/
public class MemeList extends Activity {
+ private static final String DB_FULL_PATH = "//data/data/madelyntav.c4q.nyc.memeproject/databases/myDb";
ListView listView;
- HashMap memePairs;
private Uri uri;
+ List memeList;
+ List imageUrls;
+ List imageTitles;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -30,60 +43,115 @@ public void onCreate(Bundle savedInstanceState) {
listView = (ListView) findViewById(R.id.listView);
- memePairs = new HashMap<>();
- memePairs.put(R.drawable.actual_advice_mallard, "Actual Advice Mallard");
- memePairs.put(R.drawable.but_thats_none_of_my_business, "But That's None Of My Business");
- memePairs.put(R.drawable.creepy_condescending_wonka, "Creepy Condescending Wonka");
- memePairs.put(R.drawable.futurama_fry, "Skeptical Fry");
- memePairs.put(R.drawable.good_guy_greg, "Good Guy Greg");
- memePairs.put(R.drawable.liam_neeson_taken, "Liam Neeson Taken");
- memePairs.put(R.drawable.one_does_not_simply, "One Does Not Simply");
- memePairs.put(R.drawable.scumbag_steve, "Scumbag Steve");
- memePairs.put(R.drawable.shut_up_and_take_my_money_fry, "Shut Up And Take My Money");
- memePairs.put(R.drawable.ten_guy, "Ten Guy");
- memePairs.put(R.drawable.the_most_interesting_man_in_the_world, "The Most Interesting Man In The World");
- memePairs.put(R.drawable.third_world_skeptical_kid, "Third World Skeptical Kid");
- memePairs.put(R.drawable.unhelpful_high_school_teacher, "Unhelpful High School Teacher");
- memePairs.put(R.drawable.yao_ming, "Yao Ming");
- memePairs.put(R.drawable.you_the_real_mvp, "You The Real MVP");
+ if(dataBaseExists()){
+ memeList = loadData();
- final ArrayList memeImages = new ArrayList();
- ArrayList memeNames = new ArrayList();
- addItemsToArrays(memeImages, memeNames);
+ imageUrls = new ArrayList();
+ imageTitles = new ArrayList();
+ for(Meme meme : memeList){
+ imageUrls.add(meme.getUrl());
+ imageTitles.add(meme.getName());
+ }
- CustomArrayAdapter memeAdapter = new CustomArrayAdapter(getApplicationContext(), memeNames, memeImages);
+ listView.setAdapter(new CustomArrayAdapter(getApplicationContext(), imageTitles, imageUrls, true));
+ }else{
- listView.setAdapter(memeAdapter);
+ retrofitGetMemeTemplates();
+ }
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView> parent, View view, int position, long id) {
Intent intent = new Intent(MemeList.this, EditPhoto.class);
- uri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + getResources().getResourcePackageName(memeImages.get(position)) + '/' + getResources().getResourceTypeName(memeImages.get(position)) + '/' + getResources().getResourceEntryName(memeImages.get(position)));
+ //uri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + getResources().getResourcePackageName(memeImages.get(position)) + '/' + getResources().getResourceTypeName(memeImages.get(position)) + '/' + getResources().getResourceEntryName(memeImages.get(position)));
intent.putExtra("image", uri);
startActivity(intent);
Toast.makeText(getApplicationContext(), "Please select VANILLA or DEMO layout to begin", Toast.LENGTH_SHORT).show();
-
}
});
+ }
+
+ private List loadData() {
+
+ MySQLiteOpenHelper db = MySQLiteOpenHelper.getInstance(this);
+ return db.loadData();
+ }
+ private void insertData(Meme meme) {
+ MySQLiteOpenHelper db = MySQLiteOpenHelper.getInstance(this);
+ db.insertRow(meme);
+ }
+
+ private void retrofitGetMemeTemplates(){
+
+ RestAdapter restAdapter = new RestAdapter.Builder()
+ .setEndpoint("https://api.imgflip.com")
+ .setLogLevel(RestAdapter.LogLevel.FULL)
+ .build();
+
+ MemeTemplateAPI memeTemplateAPI = restAdapter.create(MemeTemplateAPI.class);
+
+ memeTemplateAPI.getTemplates(new Callback() {
+ @Override
+ public void success(MemeTemplate memeTemplate, Response response) {
+ memeList = memeTemplate.getData().getMemes();
+ imageUrls = new ArrayList();
+ imageTitles = new ArrayList();
+ for(Meme meme : memeList){
+ imageUrls.add(meme.getUrl());
+ imageTitles.add(meme.getName());
+ }
+
+ loadDBSetAdapter();
+ }
+ @Override
+ public void failure(RetrofitError error) {
+ (Toast.makeText(MemeList.this,"Couldn't load popular Memes",Toast.LENGTH_LONG)).show();
+ }
+ });
}
- public void addItemsToArrays(ArrayList images, ArrayList titles) {
- int position = 0;
- for (Integer image : memePairs.keySet()) {
+ private void loadDBSetAdapter(){
+
+ (new AsyncTask>() {
+ @Override
+ protected List doInBackground(Void... voids) {
+
+ for(Meme meme : memeList) {
+ insertData(meme);
+ }
+
+ return loadData();
+ }
- images.add(position, image);
- titles.add(position, memePairs.get(image));
- position++;
+ @Override
+ protected void onPostExecute(List memes) {
+ super.onPostExecute(memes);
+
+ listView.setAdapter(new CustomArrayAdapter(getApplicationContext(), imageTitles, imageUrls, true));
+ }
+ }).execute();
+
+ }
+
+ private boolean dataBaseExists() {
+ SQLiteDatabase checkDB = null;
+ try {
+ checkDB = SQLiteDatabase.openDatabase(DB_FULL_PATH, null,
+ SQLiteDatabase.OPEN_READONLY);
+ checkDB.close();
+ } catch (SQLiteException e) {
+ // database doesn't exist yet.
}
+ return checkDB != null;
}
+
}
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/Data.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/Data.java
new file mode 100755
index 0000000..2d2216c
--- /dev/null
+++ b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/Data.java
@@ -0,0 +1,30 @@
+package madelyntav.c4q.nyc.memeproject.Meme_API;
+
+import java.util.ArrayList;
+import java.util.List;
+import com.google.gson.annotations.Expose;
+
+public class Data {
+
+ @Expose
+ private List memes = new ArrayList();
+
+ /**
+ *
+ * @return
+ * The memes
+ */
+ public List getMemes() {
+ return memes;
+ }
+
+ /**
+ *
+ * @param memes
+ * The memes
+ */
+ public void setMemes(List memes) {
+ this.memes = memes;
+ }
+
+}
\ No newline at end of file
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/Meme.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/Meme.java
new file mode 100755
index 0000000..61d9f40
--- /dev/null
+++ b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/Meme.java
@@ -0,0 +1,114 @@
+package madelyntav.c4q.nyc.memeproject.Meme_API;
+
+import com.google.gson.annotations.Expose;
+
+public class Meme {
+
+ @Expose
+ private String id;
+ @Expose
+ private String name;
+ @Expose
+ private String url;
+ @Expose
+ private Integer width;
+ @Expose
+ private Integer height;
+
+ //used for the database
+ public Meme(String name, String url) {
+ this.name = name;
+ this.url = url;
+ }
+
+ /**
+ *
+ * @return
+ * The id
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * @param id
+ * The id
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * @return
+ * The name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ *
+ * @param name
+ * The name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ *
+ * @return
+ * The url
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ *
+ * @param url
+ * The url
+ */
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ *
+ * @return
+ * The width
+ */
+ public Integer getWidth() {
+ return width;
+ }
+
+ /**
+ *
+ * @param width
+ * The width
+ */
+ public void setWidth(Integer width) {
+ this.width = width;
+ }
+
+ /**
+ *
+ * @return
+ * The height
+ */
+ public Integer getHeight() {
+ return height;
+ }
+
+ /**
+ *
+ * @param height
+ * The height
+ */
+ public void setHeight(Integer height) {
+ this.height = height;
+ }
+
+}
\ No newline at end of file
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/MemeTemplate.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/MemeTemplate.java
new file mode 100755
index 0000000..983b429
--- /dev/null
+++ b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/MemeTemplate.java
@@ -0,0 +1,48 @@
+package madelyntav.c4q.nyc.memeproject.Meme_API;
+
+import com.google.gson.annotations.Expose;
+
+public class MemeTemplate {
+
+ @Expose
+ private Boolean success;
+ @Expose
+ private Data data;
+
+ /**
+ *
+ * @return
+ * The success
+ */
+ public Boolean getSuccess() {
+ return success;
+ }
+
+ /**
+ *
+ * @param success
+ * The success
+ */
+ public void setSuccess(Boolean success) {
+ this.success = success;
+ }
+
+ /**
+ *
+ * @return
+ * The data
+ */
+ public Data getData() {
+ return data;
+ }
+
+ /**
+ *
+ * @param data
+ * The data
+ */
+ public void setData(Data data) {
+ this.data = data;
+ }
+
+}
\ No newline at end of file
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/MemeTemplateAPI.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/MemeTemplateAPI.java
new file mode 100755
index 0000000..700dcab
--- /dev/null
+++ b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_API/MemeTemplateAPI.java
@@ -0,0 +1,14 @@
+package madelyntav.c4q.nyc.memeproject.Meme_API;
+
+import retrofit.Callback;
+import retrofit.http.GET;
+
+/**
+ * Created by c4q-anthonyf on 7/17/15.
+ */
+public interface MemeTemplateAPI {
+
+ @GET("/get_memes")
+ public void getTemplates(Callback response);
+
+}
diff --git a/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_DB/MySQLiteOpenHelper.java b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_DB/MySQLiteOpenHelper.java
new file mode 100755
index 0000000..7031add
--- /dev/null
+++ b/MemeProject/app/src/main/java/madelyntav/c4q/nyc/memeproject/Meme_DB/MySQLiteOpenHelper.java
@@ -0,0 +1,113 @@
+package madelyntav.c4q.nyc.memeproject.Meme_DB;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.provider.BaseColumns;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import madelyntav.c4q.nyc.memeproject.Meme_API.Meme;
+
+/**
+ * Created by c4q-anthonyf on 7/17/15.
+ */
+public class MySQLiteOpenHelper extends android.database.sqlite.SQLiteOpenHelper {
+
+ final static String MYDB = "myDb";
+ final static int VERSION = 1;
+
+ public static MySQLiteOpenHelper INSTANCE;
+
+ public static synchronized MySQLiteOpenHelper getInstance(Context context)
+ {
+ if(INSTANCE == null)
+ {
+ INSTANCE = new MySQLiteOpenHelper(context.getApplicationContext());
+ }
+
+ return INSTANCE;
+ }
+
+ public MySQLiteOpenHelper(Context context) {
+ super(context, MYDB, null, VERSION);
+ }
+
+ @Override
+ public void onCreate(SQLiteDatabase sqLiteDatabase) {
+ sqLiteDatabase.execSQL(SQL_CREATE_ENTRIES);
+ }
+
+ @Override
+ public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i2) {
+ sqLiteDatabase.execSQL(SQL_DELETE_ENTRIES);
+ onCreate(sqLiteDatabase);
+ }
+
+ public void insertRow(Meme meme){
+
+ SQLiteDatabase db = getWritableDatabase();
+
+ ContentValues values = new ContentValues();
+ values.put(MemeTemplateDB.COLUMN_NAME_MEME_ID, meme.getId());
+ values.put(MemeTemplateDB.COLUMN_NAME_NAMES, meme.getName());
+ values.put(MemeTemplateDB.COLUMN_NAME_URLS, meme.getUrl());
+
+ db.insertOrThrow(
+ MemeTemplateDB.TABLE_NAME,
+ null,
+ values);
+ }
+
+ public List loadData()
+ {
+ String[] projection = {
+ MemeTemplateDB._ID,
+ MemeTemplateDB.COLUMN_NAME_NAMES,
+ MemeTemplateDB.COLUMN_NAME_URLS
+ };
+
+ SQLiteDatabase db = getWritableDatabase();
+
+ List memes = new ArrayList<>();
+
+ Cursor cursor = db.query(
+ MemeTemplateDB.TABLE_NAME,
+ projection,
+ null, //where
+ null, //where args
+ null, //group by (ignore)
+ null, //having (ignore)
+ MemeTemplateDB._ID + " desc");//order by
+ while(cursor.moveToNext())
+ {
+ memes.add(new Meme(cursor.getString(
+ cursor.getColumnIndex(MemeTemplateDB.COLUMN_NAME_NAMES)),
+ cursor.getString(
+ cursor.getColumnIndex(MemeTemplateDB.COLUMN_NAME_URLS))));
+ }
+
+ cursor.close();
+
+ return memes;
+ }
+
+ public static abstract class MemeTemplateDB implements BaseColumns {
+ public static final String TABLE_NAME = "popular_memes";
+ public static final String COLUMN_NAME_MEME_ID = "meme_id";
+ public static final String COLUMN_NAME_NAMES = "names";
+ public static final String COLUMN_NAME_URLS = "urls";
+ }
+
+ private static final String SQL_CREATE_ENTRIES = "CREATE TABLE " + MemeTemplateDB.TABLE_NAME + " (" +
+ MemeTemplateDB._ID + " INTEGER PRIMARY KEY," +
+ MemeTemplateDB.COLUMN_NAME_MEME_ID + " TEXT NOT NULL UNIQUE, " +
+ MemeTemplateDB.COLUMN_NAME_NAMES + " TEXT," +
+ MemeTemplateDB.COLUMN_NAME_URLS + " TEXT" +
+ " )";
+
+ private static final String SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS " + MemeTemplateDB.TABLE_NAME;
+
+}
diff --git a/SultanFragment/.gitignore b/SultanFragment/.gitignore
new file mode 100644
index 0000000..9c4de58
--- /dev/null
+++ b/SultanFragment/.gitignore
@@ -0,0 +1,7 @@
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
diff --git a/SultanFragment/.idea/.name b/SultanFragment/.idea/.name
new file mode 100644
index 0000000..5ac8876
--- /dev/null
+++ b/SultanFragment/.idea/.name
@@ -0,0 +1 @@
+SultanFragment
\ No newline at end of file
diff --git a/SultanFragment/.idea/compiler.xml b/SultanFragment/.idea/compiler.xml
new file mode 100644
index 0000000..9a8b7e5
--- /dev/null
+++ b/SultanFragment/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/.idea/copyright/profiles_settings.xml b/SultanFragment/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..e7bedf3
--- /dev/null
+++ b/SultanFragment/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/.idea/gradle.xml b/SultanFragment/.idea/gradle.xml
new file mode 100644
index 0000000..1bbc21d
--- /dev/null
+++ b/SultanFragment/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/.idea/misc.xml b/SultanFragment/.idea/misc.xml
new file mode 100644
index 0000000..4684197
--- /dev/null
+++ b/SultanFragment/.idea/misc.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.7
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/.idea/modules.xml b/SultanFragment/.idea/modules.xml
new file mode 100644
index 0000000..4feb91c
--- /dev/null
+++ b/SultanFragment/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/.idea/vcs.xml b/SultanFragment/.idea/vcs.xml
new file mode 100644
index 0000000..6564d52
--- /dev/null
+++ b/SultanFragment/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/SultanFragment.iml b/SultanFragment/SultanFragment.iml
new file mode 100644
index 0000000..dfbb744
--- /dev/null
+++ b/SultanFragment/SultanFragment.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/app/.gitignore b/SultanFragment/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/SultanFragment/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/SultanFragment/app/app.iml b/SultanFragment/app/app.iml
new file mode 100644
index 0000000..a8e690d
--- /dev/null
+++ b/SultanFragment/app/app.iml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/app/build.gradle b/SultanFragment/app/build.gradle
new file mode 100644
index 0000000..b865ee1
--- /dev/null
+++ b/SultanFragment/app/build.gradle
@@ -0,0 +1,24 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 22
+ buildToolsVersion "23.0.0 rc2"
+
+ defaultConfig {
+ applicationId "gmsyrimis.c4q.nyc.sultanfragment"
+ minSdkVersion 21
+ 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'])
+}
diff --git a/SultanFragment/app/proguard-rules.pro b/SultanFragment/app/proguard-rules.pro
new file mode 100644
index 0000000..d1a0a9b
--- /dev/null
+++ b/SultanFragment/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/c4q-george/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/SultanFragment/app/src/androidTest/java/gmsyrimis/c4q/nyc/sultanfragment/ApplicationTest.java b/SultanFragment/app/src/androidTest/java/gmsyrimis/c4q/nyc/sultanfragment/ApplicationTest.java
new file mode 100644
index 0000000..8f23cb1
--- /dev/null
+++ b/SultanFragment/app/src/androidTest/java/gmsyrimis/c4q/nyc/sultanfragment/ApplicationTest.java
@@ -0,0 +1,13 @@
+package gmsyrimis.c4q.nyc.sultanfragment;
+
+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/SultanFragment/app/src/main/AndroidManifest.xml b/SultanFragment/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..41bfdf7
--- /dev/null
+++ b/SultanFragment/app/src/main/AndroidManifest.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/FragmentTwo.java b/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/FragmentTwo.java
new file mode 100644
index 0000000..8a35943
--- /dev/null
+++ b/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/FragmentTwo.java
@@ -0,0 +1,26 @@
+package gmsyrimis.c4q.nyc.sultanfragment;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+/**
+ * Created by c4q-george on 7/18/15.
+ */
+public class FragmentTwo extends Fragment {
+
+ TextView gv;
+
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ View g = inflater.inflate(R.layout.fragment_two_layout, container, false);
+ gv = (TextView) g.findViewById(R.id.frag_two_tv);
+ return g;
+ }
+
+
+}
diff --git a/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/MainActivity.java b/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/MainActivity.java
new file mode 100644
index 0000000..060bcd3
--- /dev/null
+++ b/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/MainActivity.java
@@ -0,0 +1,62 @@
+package gmsyrimis.c4q.nyc.sultanfragment;
+
+import android.app.Activity;
+import android.app.FragmentManager;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+
+public class MainActivity extends Activity {
+
+ Button one;
+ Button two;
+ Button incBTN;
+ TextView counterTV;
+ FragmentManager fm;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ fm = getFragmentManager();
+
+ one = (Button) findViewById(R.id.go_to_frag_one);
+ two = (Button) findViewById(R.id.go_to_frag_two);
+
+ incBTN = (Button) findViewById(R.id.main_inc_btn);
+ counterTV = (TextView) findViewById(R.id.main_counter_tv);
+
+ incBTN.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ int g = Integer.parseInt(counterTV.getText().toString());
+ counterTV.setText(String.valueOf(++g));
+ }
+ });
+
+ one.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ MainFragment mf = new MainFragment();
+ fm.beginTransaction().replace(R.id.main_container, mf).addToBackStack(null).commit();
+ }
+ });
+
+ two.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ FragmentTwo fragmentTwo = new FragmentTwo();
+ fm.beginTransaction().replace(R.id.main_container, fragmentTwo).addToBackStack(null).commit();
+
+ }
+ });
+
+ }
+
+
+}
diff --git a/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/MainFragment.java b/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/MainFragment.java
new file mode 100644
index 0000000..30073ec
--- /dev/null
+++ b/SultanFragment/app/src/main/java/gmsyrimis/c4q/nyc/sultanfragment/MainFragment.java
@@ -0,0 +1,36 @@
+package gmsyrimis.c4q.nyc.sultanfragment;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.TextView;
+
+/**
+ * Created by c4q-george on 7/18/15.
+ */
+public class MainFragment extends Fragment {
+ TextView tv;
+ Button btn;
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ View v = inflater.inflate(R.layout.main_fragment_layout, container, false);
+ tv = (TextView) v.findViewById(R.id.frag_counter_tv);
+ btn = (Button) v.findViewById(R.id.frag_inc_btn);
+ return v;
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ btn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ int g = Integer.parseInt(tv.getText().toString());
+ tv.setText(String.valueOf(++g));
+ }
+ });
+ }
+}
diff --git a/SultanFragment/app/src/main/res/layout/activity_main.xml b/SultanFragment/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..e094f75
--- /dev/null
+++ b/SultanFragment/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SultanFragment/app/src/main/res/layout/fragment_two_layout.xml b/SultanFragment/app/src/main/res/layout/fragment_two_layout.xml
new file mode 100644
index 0000000..d42a5ab
--- /dev/null
+++ b/SultanFragment/app/src/main/res/layout/fragment_two_layout.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/app/src/main/res/layout/main_fragment_layout.xml b/SultanFragment/app/src/main/res/layout/main_fragment_layout.xml
new file mode 100644
index 0000000..d021b00
--- /dev/null
+++ b/SultanFragment/app/src/main/res/layout/main_fragment_layout.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SultanFragment/app/src/main/res/menu/menu_main.xml b/SultanFragment/app/src/main/res/menu/menu_main.xml
new file mode 100644
index 0000000..87a750e
--- /dev/null
+++ b/SultanFragment/app/src/main/res/menu/menu_main.xml
@@ -0,0 +1,5 @@
+
diff --git a/SultanFragment/app/src/main/res/mipmap-hdpi/ic_launcher.png b/SultanFragment/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/SultanFragment/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/SultanFragment/app/src/main/res/mipmap-mdpi/ic_launcher.png b/SultanFragment/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/SultanFragment/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/SultanFragment/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/SultanFragment/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/SultanFragment/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/SultanFragment/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/SultanFragment/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/SultanFragment/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/SultanFragment/app/src/main/res/values-v21/styles.xml b/SultanFragment/app/src/main/res/values-v21/styles.xml
new file mode 100644
index 0000000..dba3c41
--- /dev/null
+++ b/SultanFragment/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/SultanFragment/app/src/main/res/values-w820dp/dimens.xml b/SultanFragment/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/SultanFragment/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/SultanFragment/app/src/main/res/values/dimens.xml b/SultanFragment/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/SultanFragment/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 16dp
+ 16dp
+
diff --git a/SultanFragment/app/src/main/res/values/strings.xml b/SultanFragment/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..cc10a59
--- /dev/null
+++ b/SultanFragment/app/src/main/res/values/strings.xml
@@ -0,0 +1,6 @@
+
+ SultanFragment
+
+ Hello world!
+ Settings
+
diff --git a/SultanFragment/app/src/main/res/values/styles.xml b/SultanFragment/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..ff6c9d2
--- /dev/null
+++ b/SultanFragment/app/src/main/res/values/styles.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/SultanFragment/build.gradle b/SultanFragment/build.gradle
new file mode 100644
index 0000000..9405f3f
--- /dev/null
+++ b/SultanFragment/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/SultanFragment/gradle.properties b/SultanFragment/gradle.properties
new file mode 100644
index 0000000..1d3591c
--- /dev/null
+++ b/SultanFragment/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/SultanFragment/gradle/wrapper/gradle-wrapper.jar b/SultanFragment/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..8c0fb64
Binary files /dev/null and b/SultanFragment/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/SultanFragment/gradle/wrapper/gradle-wrapper.properties b/SultanFragment/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..0c71e76
--- /dev/null
+++ b/SultanFragment/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/SultanFragment/gradlew b/SultanFragment/gradlew
new file mode 100755
index 0000000..91a7e26
--- /dev/null
+++ b/SultanFragment/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/SultanFragment/gradlew.bat b/SultanFragment/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/SultanFragment/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/SultanFragment/settings.gradle b/SultanFragment/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/SultanFragment/settings.gradle
@@ -0,0 +1 @@
+include ':app'