diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..4c2a413
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+OMG
\ No newline at end of file
diff --git a/.idea/OMG.iml b/.idea/OMG.iml
new file mode 100644
index 0000000..4848a5d
--- /dev/null
+++ b/.idea/OMG.iml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
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/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..9fe2e42
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.7
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..16efab9
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..46e7a45
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1438480680134
+
+ 1438480680134
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/.idea/compiler.xml b/OMG/.idea/compiler.xml
index 9a8b7e5..96cc43e 100644
--- a/OMG/.idea/compiler.xml
+++ b/OMG/.idea/compiler.xml
@@ -1,7 +1,6 @@
-
@@ -12,6 +11,7 @@
+
diff --git a/OMG/.idea/misc.xml b/OMG/.idea/misc.xml
index 80eaa3a..c60d22d 100644
--- a/OMG/.idea/misc.xml
+++ b/OMG/.idea/misc.xml
@@ -1,5 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -10,7 +37,7 @@
-
+
diff --git a/OMG/.idea/runConfigurations.xml b/OMG/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/OMG/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/.idea/vcs.xml b/OMG/.idea/vcs.xml
index 6564d52..6c0b863 100644
--- a/OMG/.idea/vcs.xml
+++ b/OMG/.idea/vcs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/OMG/OMG.iml b/OMG/OMG.iml
index 32ef47c..0f7db37 100644
--- a/OMG/OMG.iml
+++ b/OMG/OMG.iml
@@ -8,7 +8,7 @@
-
+
diff --git a/OMG/app/app.iml b/OMG/app/app.iml
new file mode 100644
index 0000000..2beba66
--- /dev/null
+++ b/OMG/app/app.iml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugAndroidTestSources
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/build.gradle b/OMG/app/build.gradle
index 27321a1..87720cd 100644
--- a/OMG/app/build.gradle
+++ b/OMG/app/build.gradle
@@ -22,4 +22,6 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
+ compile 'com.ogaclejapan.arclayout:library:1.0.1@aar'
+
}
diff --git a/OMG/app/src/main/AndroidManifest.xml b/OMG/app/src/main/AndroidManifest.xml
index 7aed2a1..53c1c3d 100644
--- a/OMG/app/src/main/AndroidManifest.xml
+++ b/OMG/app/src/main/AndroidManifest.xml
@@ -2,6 +2,9 @@
+
+
+
+
-
+ android:name=".DemoActivity"
+ android:label="@string/app_name"
+ />
+
+
+
+
+
+
+
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/AnimatorUtils.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/AnimatorUtils.java
new file mode 100755
index 0000000..0979b3b
--- /dev/null
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/AnimatorUtils.java
@@ -0,0 +1,36 @@
+package charlyn23.c4q.nyc.omg;
+
+import android.animation.PropertyValuesHolder;
+
+public class AnimatorUtils {
+
+ public static final String ROTATION = "rotation";
+ public static final String SCALE_X = "scaleX";
+ public static final String SCALE_Y = "scaleY";
+ public static final String TRANSLATION_X = "translationX";
+ public static final String TRANSLATION_Y = "translationY";
+
+ private AnimatorUtils() {
+ //No instances.
+ }
+
+ public static PropertyValuesHolder rotation(float... values) {
+ return PropertyValuesHolder.ofFloat(ROTATION, values);
+ }
+
+ public static PropertyValuesHolder translationX(float... values) {
+ return PropertyValuesHolder.ofFloat(TRANSLATION_X, values);
+ }
+
+ public static PropertyValuesHolder translationY(float... values) {
+ return PropertyValuesHolder.ofFloat(TRANSLATION_Y, values);
+ }
+
+ public static PropertyValuesHolder scaleX(float... values) {
+ return PropertyValuesHolder.ofFloat(SCALE_X, values);
+ }
+
+ public static PropertyValuesHolder scaleY(float... values) {
+ return PropertyValuesHolder.ofFloat(SCALE_Y, values);
+ }
+}
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/Demo.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/Demo.java
new file mode 100755
index 0000000..54cb024
--- /dev/null
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/Demo.java
@@ -0,0 +1,60 @@
+package charlyn23.c4q.nyc.omg;
+
+import android.content.Context;
+
+import com.ogaclejapan.arclayout.Arc;
+
+public enum Demo {
+
+ //Basic
+ CENTER(R.string.title_center, R.string.note_center, R.layout.arc_large, Arc.CENTER),
+ LEFT(R.string.title_left, R.string.note_left, R.layout.arc_medium, Arc.LEFT),
+ RIGHT(R.string.title_right, R.string.note_right, R.layout.arc_medium, Arc.RIGHT),
+ TOP(R.string.title_top, R.string.note_top, R.layout.arc_medium, Arc.TOP),
+ TOP_LEFT(R.string.title_top_left, R.string.note_top_left, R.layout.arc_small, Arc.TOP_LEFT),
+ TOP_RIGHT(R.string.title_top_right, R.string.note_top_right, R.layout.arc_small, Arc.TOP_RIGHT),
+ BOTTOM(R.string.title_bottom, R.string.note_bottom, R.layout.arc_medium, Arc.BOTTOM),
+ BOTTOM_LEFT(R.string.title_bottom_left, R.string.note_bottom_left, R.layout.arc_small,
+ Arc.BOTTOM_LEFT),
+ BOTTOM_RIGHT(R.string.title_bottom_right, R.string.note_bottom_right, R.layout.arc_small,
+ Arc.BOTTOM_RIGHT),
+
+ //Advanced
+ ADVANCED_FREE_ANGLE(R.string.title_advanced_freeangle, R.string.note_advanced_freeangle,
+ R.layout.arc_free_angle, Arc.CENTER) {
+ @Override
+ public void startActivity(Context context) {
+ DemoFreeAngleActivity.startActivity(context, this);
+ }
+ },
+
+ ADVANCED_TUMBLR(R.string.title_advanced_tumblr, 0, 0, null) {
+ @Override
+ public void startActivity(Context context) {
+ DemoLikeTumblrActivity.startActivity(context, this);
+ }
+ },
+ ADVANCED_PATH(R.string.title_advanced_path, 0, 0, null) {
+ @Override
+ public void startActivity(Context context) {
+ charlyn23.c4q.nyc.omg.DemoLikePathActivity.startActivity(context, this);
+ }
+ };
+
+ public final int titleResId;
+ public final int noteResId;
+ public final int layoutResId;
+ public final Arc arc;
+
+ Demo(int titleResId, int noteResId, int layoutResId, Arc arc) {
+ this.titleResId = titleResId;
+ this.noteResId = noteResId;
+ this.layoutResId = layoutResId;
+ this.arc = arc;
+ }
+
+ public void startActivity(Context context) {
+ DemoActivity.startActivity(context, this);
+ }
+
+}
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoActivity.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoActivity.java
new file mode 100755
index 0000000..d9283c5
--- /dev/null
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoActivity.java
@@ -0,0 +1,114 @@
+package charlyn23.c4q.nyc.omg;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.text.Html;
+import android.view.Gravity;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.FrameLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.ogaclejapan.arclayout.ArcLayout;
+
+
+
+public class DemoActivity extends ActionBarActivity implements View.OnClickListener {
+
+ private static final String KEY_DEMO = "demo";
+ Toast toast = null;
+ ArcLayout arcLayout;
+
+ public static void startActivity(Context context, charlyn23.c4q.nyc.omg.Demo demo) {
+ Intent intent = new Intent(context, DemoActivity.class);
+ intent.putExtra(KEY_DEMO, demo.name());
+ context.startActivity(intent);
+ }
+
+ private static charlyn23.c4q.nyc.omg.Demo getDemo(Intent intent) {
+ return charlyn23.c4q.nyc.omg.Demo.valueOf(intent.getStringExtra(KEY_DEMO));
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ charlyn23.c4q.nyc.omg.Demo demo = getDemo(getIntent());
+
+ setContentView(demo.layoutResId);
+ arcLayout = (ArcLayout) findViewById(R.id.arc_layout);
+ arcLayout.setArc(demo.arc);
+
+ for (int i = 0, size = arcLayout.getChildCount(); i < size; i++) {
+ arcLayout.getChildAt(i).setOnClickListener(this);
+ }
+
+ TextView note = (TextView) findViewById(R.id.note_text);
+ note.setText(Html.fromHtml(getString(demo.noteResId)));
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) note.getLayoutParams();
+ switch (demo.arc) {
+ case TOP:
+ case TOP_LEFT:
+ case TOP_RIGHT:
+ lp.gravity = Gravity.BOTTOM;
+ break;
+ case BOTTOM:
+ case BOTTOM_LEFT:
+ case BOTTOM_RIGHT:
+ lp.gravity = Gravity.TOP;
+ break;
+ default:
+ lp.gravity = Gravity.TOP;
+ }
+
+ ActionBar bar = getSupportActionBar();
+ bar.setTitle(demo.titleResId);
+ bar.setDisplayHomeAsUpEnabled(true);
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.menu_demo, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ break;
+ case R.id.menu_reverse:
+ arcLayout.setReverseAngle(!arcLayout.isReverseAngle());
+ break;
+ default:
+ return super.onOptionsItemSelected(item);
+ }
+ return true;
+ }
+
+ @Override
+ public void onClick(View v) {
+ if (v instanceof Button) {
+ showToast((Button) v);
+ }
+ }
+
+ private void showToast(Button btn) {
+ if (toast != null) {
+ toast.cancel();
+ }
+
+ String text = "Clicked: " + btn.getText();
+ toast = Toast.makeText(this, text, Toast.LENGTH_SHORT);
+ toast.show();
+
+ }
+}
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoFreeAngleActivity.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoFreeAngleActivity.java
new file mode 100755
index 0000000..5cac4a6
--- /dev/null
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoFreeAngleActivity.java
@@ -0,0 +1,102 @@
+package charlyn23.c4q.nyc.omg;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.text.Html;
+import android.view.Gravity;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.FrameLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.ogaclejapan.arclayout.ArcLayout;
+
+public class DemoFreeAngleActivity extends ActionBarActivity implements View.OnClickListener {
+
+ private static final String KEY_DEMO = "demo";
+ Toast toast = null;
+ ArcLayout arcLayout;
+
+ public static void startActivity(Context context, charlyn23.c4q.nyc.omg.Demo demo) {
+ Intent intent = new Intent(context, DemoFreeAngleActivity.class);
+ intent.putExtra(KEY_DEMO, demo.name());
+ context.startActivity(intent);
+ }
+
+ private static charlyn23.c4q.nyc.omg.Demo getDemo(Intent intent) {
+ return charlyn23.c4q.nyc.omg.Demo.valueOf(intent.getStringExtra(KEY_DEMO));
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ charlyn23.c4q.nyc.omg.Demo demo = getDemo(getIntent());
+
+ setContentView(demo.layoutResId);
+ arcLayout = (ArcLayout) findViewById(R.id.arc_layout);
+ arcLayout.setArc(demo.arc);
+
+ for (int i = 0, size = arcLayout.getChildCount(); i < size; i++) {
+ arcLayout.getChildAt(i).setOnClickListener(this);
+ }
+
+ TextView note = (TextView) findViewById(R.id.note_text);
+ note.setText(Html.fromHtml(getString(demo.noteResId)));
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) note.getLayoutParams();
+ switch (demo.arc) {
+ case TOP:
+ case TOP_LEFT:
+ case TOP_RIGHT:
+ lp.gravity = Gravity.BOTTOM;
+ break;
+ case BOTTOM:
+ case BOTTOM_LEFT:
+ case BOTTOM_RIGHT:
+ lp.gravity = Gravity.TOP;
+ break;
+ default:
+ lp.gravity = Gravity.TOP;
+ }
+
+ ActionBar bar = getSupportActionBar();
+ bar.setTitle(demo.titleResId);
+ bar.setDisplayHomeAsUpEnabled(true);
+
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ break;
+ default:
+ return super.onOptionsItemSelected(item);
+ }
+ return true;
+ }
+
+ @Override
+ public void onClick(View v) {
+ if (v instanceof Button) {
+ showToast((Button) v);
+ }
+ }
+
+ private void showToast(Button btn) {
+ if (toast != null) {
+ toast.cancel();
+ }
+
+ String text = "Clicked: " + btn.getText();
+ toast = Toast.makeText(this, text, Toast.LENGTH_SHORT);
+ toast.show();
+
+ }
+}
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoLikePathActivity.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoLikePathActivity.java
new file mode 100755
index 0000000..490f63f
--- /dev/null
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoLikePathActivity.java
@@ -0,0 +1,191 @@
+package charlyn23.c4q.nyc.omg;
+
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.animation.AnticipateInterpolator;
+import android.view.animation.OvershootInterpolator;
+import android.widget.Button;
+import android.widget.Toast;
+
+import com.ogaclejapan.arclayout.ArcLayout;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class DemoLikePathActivity extends ActionBarActivity implements View.OnClickListener {
+
+ private static final String KEY_DEMO = "demo";
+ Toast toast = null;
+ View fab;
+ View menuLayout;
+ ArcLayout arcLayout;
+
+ public static void startActivity(Context context, Demo demo) {
+ Intent intent = new Intent(context, DemoLikePathActivity.class);
+ intent.putExtra(KEY_DEMO, demo.name());
+ context.startActivity(intent);
+ }
+
+ private static Demo getDemo(Intent intent) {
+ return Demo.valueOf(intent.getStringExtra(KEY_DEMO));
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.like_a_path);
+
+ Demo demo = getDemo(getIntent());
+
+ ActionBar bar = getSupportActionBar();
+ bar.setTitle(demo.titleResId);
+ bar.setDisplayHomeAsUpEnabled(true);
+
+ fab = findViewById(R.id.fab);
+ menuLayout = findViewById(R.id.menu_layout);
+ arcLayout = (ArcLayout) findViewById(R.id.arc_layout);
+
+ for (int i = 0, size = arcLayout.getChildCount(); i < size; i++) {
+ arcLayout.getChildAt(i).setOnClickListener(this);
+ }
+
+ fab.setOnClickListener(this);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+ @Override
+ public void onClick(View v) {
+ if (v.getId() == R.id.fab) {
+ onFabClick(v);
+ return;
+ }
+
+ if (v instanceof Button) {
+ showToast((Button) v);
+ }
+
+ }
+
+ private void showToast(Button btn) {
+ if (toast != null) {
+ toast.cancel();
+ }
+
+ String text = "Clicked: " + btn.getText();
+ toast = Toast.makeText(this, text, Toast.LENGTH_SHORT);
+ toast.show();
+
+ }
+
+ private void onFabClick(View v) {
+ if (v.isSelected()) {
+ hideMenu();
+ } else {
+ showMenu();
+ }
+ v.setSelected(!v.isSelected());
+ }
+
+ @SuppressWarnings("NewApi")
+ private void showMenu() {
+ menuLayout.setVisibility(View.VISIBLE);
+
+ List animList = new ArrayList<>();
+
+ for (int i = 0, len = arcLayout.getChildCount(); i < len; i++) {
+ animList.add(createShowItemAnimator(arcLayout.getChildAt(i)));
+ }
+
+ AnimatorSet animSet = new AnimatorSet();
+ animSet.setDuration(400);
+ animSet.setInterpolator(new OvershootInterpolator());
+ animSet.playTogether(animList);
+ animSet.start();
+ }
+
+ @SuppressWarnings("NewApi")
+ private void hideMenu() {
+
+ List animList = new ArrayList<>();
+
+ for (int i = arcLayout.getChildCount() - 1; i >= 0; i--) {
+ animList.add(createHideItemAnimator(arcLayout.getChildAt(i)));
+ }
+
+ AnimatorSet animSet = new AnimatorSet();
+ animSet.setDuration(400);
+ animSet.setInterpolator(new AnticipateInterpolator());
+ animSet.playTogether(animList);
+ animSet.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ super.onAnimationEnd(animation);
+ menuLayout.setVisibility(View.INVISIBLE);
+ }
+ });
+ animSet.start();
+
+ }
+
+ private Animator createShowItemAnimator(View item) {
+
+ float dx = fab.getX() - item.getX();
+ float dy = fab.getY() - item.getY();
+
+ item.setRotation(0f);
+ item.setTranslationX(dx);
+ item.setTranslationY(dy);
+
+ Animator anim = ObjectAnimator.ofPropertyValuesHolder(
+ item,
+ AnimatorUtils.rotation(0f, 720f),
+ AnimatorUtils.translationX(dx, 0f),
+ AnimatorUtils.translationY(dy, 0f)
+ );
+
+ return anim;
+ }
+
+ private Animator createHideItemAnimator(final View item) {
+ float dx = fab.getX() - item.getX();
+ float dy = fab.getY() - item.getY();
+
+ Animator anim = ObjectAnimator.ofPropertyValuesHolder(
+ item,
+ AnimatorUtils.rotation(720f, 0f),
+ AnimatorUtils.translationX(0f, dx),
+ AnimatorUtils.translationY(0f, dy)
+ );
+
+ anim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ super.onAnimationEnd(animation);
+ item.setTranslationX(0f);
+ item.setTranslationY(0f);
+ }
+ });
+
+ return anim;
+ }
+
+}
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoLikeTumblrActivity.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoLikeTumblrActivity.java
new file mode 100755
index 0000000..3711573
--- /dev/null
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/DemoLikeTumblrActivity.java
@@ -0,0 +1,253 @@
+package charlyn23.c4q.nyc.omg;
+
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewAnimationUtils;
+import android.view.animation.AccelerateDecelerateInterpolator;
+import android.view.animation.DecelerateInterpolator;
+import android.widget.Button;
+import android.widget.Toast;
+
+import com.ogaclejapan.arclayout.ArcLayout;
+import java.util.ArrayList;
+import java.util.List;
+
+import charlyn23.c4q.nyc.omg.widget.ClipRevealFrame;
+
+
+
+public class DemoLikeTumblrActivity extends ActionBarActivity implements View.OnClickListener {
+
+ private static final String KEY_DEMO = "demo";
+ Toast toast = null;
+ View rootLayout;
+ ClipRevealFrame menuLayout;
+ ArcLayout arcLayout;
+ View centerItem;
+
+ public static void startActivity(Context context, charlyn23.c4q.nyc.omg.Demo demo) {
+ Intent intent = new Intent(context, DemoLikeTumblrActivity.class);
+ intent.putExtra(KEY_DEMO, demo.name());
+ context.startActivity(intent);
+ }
+
+ private static charlyn23.c4q.nyc.omg.Demo getDemo(Intent intent) {
+ return charlyn23.c4q.nyc.omg.Demo.valueOf(intent.getStringExtra(KEY_DEMO));
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.like_a_tumblr);
+
+ charlyn23.c4q.nyc.omg.Demo demo = getDemo(getIntent());
+
+ ActionBar bar = getSupportActionBar();
+ bar.setTitle(demo.titleResId);
+ bar.setDisplayHomeAsUpEnabled(true);
+
+ rootLayout = findViewById(R.id.root_layout);
+ menuLayout = (ClipRevealFrame) findViewById(R.id.menu_layout);
+ arcLayout = (ArcLayout) findViewById(R.id.arc_layout);
+ centerItem = findViewById(R.id.center_item);
+
+ centerItem.setOnClickListener(this);
+ for (int i = 0, size = arcLayout.getChildCount(); i < size; i++) {
+ arcLayout.getChildAt(i).setOnClickListener(this);
+ }
+
+ findViewById(R.id.fab).setOnClickListener(this);
+
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+ @Override
+ public void onClick(View v) {
+ if (v.getId() == R.id.fab) {
+ onFabClick(v);
+ return;
+ }
+
+ if (v instanceof Button) {
+ showToast((Button) v);
+ }
+
+ }
+
+ private void showToast(Button btn) {
+ if (toast != null) {
+ toast.cancel();
+ }
+
+ String text = "Clicked: " + btn.getText();
+ toast = Toast.makeText(this, text, Toast.LENGTH_SHORT);
+ toast.show();
+
+ }
+
+ private void onFabClick(View v) {
+ int x = (v.getLeft() + v.getRight()) / 2;
+ int y = (v.getTop() + v.getBottom()) / 2;
+ float radiusOfFab = 1f * v.getWidth() / 2f;
+ float radiusFromFabToRoot = (float) Math.hypot(
+ Math.max(x, rootLayout.getWidth() - x),
+ Math.max(y, rootLayout.getHeight() - y));
+
+ if (v.isSelected()) {
+ hideMenu(x, y, radiusFromFabToRoot, radiusOfFab);
+ } else {
+ showMenu(x, y, radiusOfFab, radiusFromFabToRoot);
+ }
+ v.setSelected(!v.isSelected());
+ }
+
+ private void showMenu(int cx, int cy, float startRadius, float endRadius) {
+ menuLayout.setVisibility(View.VISIBLE);
+
+ List animList = new ArrayList<>();
+
+ Animator revealAnim = createCircularReveal(menuLayout, cx, cy, startRadius, endRadius);
+ revealAnim.setInterpolator(new AccelerateDecelerateInterpolator());
+ revealAnim.setDuration(200);
+
+ animList.add(revealAnim);
+ animList.add(createShowItemAnimator(centerItem));
+
+ for (int i = 0, len = arcLayout.getChildCount(); i < len; i++) {
+ animList.add(createShowItemAnimator(arcLayout.getChildAt(i)));
+ }
+
+ AnimatorSet animSet = new AnimatorSet();
+ animSet.playSequentially(animList);
+ animSet.start();
+ }
+
+ private void hideMenu(int cx, int cy, float startRadius, float endRadius) {
+ List animList = new ArrayList<>();
+
+ for (int i = arcLayout.getChildCount() - 1; i >= 0; i--) {
+ animList.add(createHideItemAnimator(arcLayout.getChildAt(i)));
+ }
+
+ animList.add(createHideItemAnimator(centerItem));
+
+ Animator revealAnim = createCircularReveal(menuLayout, cx, cy, startRadius, endRadius);
+ revealAnim.setInterpolator(new AccelerateDecelerateInterpolator());
+ revealAnim.setDuration(200);
+ revealAnim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ super.onAnimationEnd(animation);
+ menuLayout.setVisibility(View.INVISIBLE);
+ }
+ });
+
+ animList.add(revealAnim);
+
+ AnimatorSet animSet = new AnimatorSet();
+ animSet.playSequentially(animList);
+ animSet.start();
+
+ }
+
+ private Animator createShowItemAnimator(View item) {
+ float dx = centerItem.getX() - item.getX();
+ float dy = centerItem.getY() - item.getY();
+
+ item.setScaleX(0f);
+ item.setScaleY(0f);
+ item.setTranslationX(dx);
+ item.setTranslationY(dy);
+
+ Animator anim = ObjectAnimator.ofPropertyValuesHolder(
+ item,
+ charlyn23.c4q.nyc.omg.AnimatorUtils.scaleX(0f, 1f),
+ charlyn23.c4q.nyc.omg.AnimatorUtils.scaleY(0f, 1f),
+ charlyn23.c4q.nyc.omg.AnimatorUtils.translationX(dx, 0f),
+ charlyn23.c4q.nyc.omg.AnimatorUtils.translationY(dy, 0f)
+ );
+
+ anim.setInterpolator(new DecelerateInterpolator());
+ anim.setDuration(50);
+ return anim;
+ }
+
+ private Animator createHideItemAnimator(final View item) {
+ final float dx = centerItem.getX() - item.getX();
+ final float dy = centerItem.getY() - item.getY();
+
+ Animator anim = ObjectAnimator.ofPropertyValuesHolder(
+ item,
+ charlyn23.c4q.nyc.omg.AnimatorUtils.scaleX(1f, 0f),
+ charlyn23.c4q.nyc.omg.AnimatorUtils.scaleY(1f, 0f),
+ charlyn23.c4q.nyc.omg.AnimatorUtils.translationX(0f, dx),
+ charlyn23.c4q.nyc.omg.AnimatorUtils.translationY(0f, dy)
+ );
+
+ anim.setInterpolator(new DecelerateInterpolator());
+ anim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ super.onAnimationEnd(animation);
+ item.setTranslationX(0f);
+ item.setTranslationY(0f);
+ }
+ });
+ anim.setDuration(50);
+ return anim;
+ }
+
+ private Animator createCircularReveal(final ClipRevealFrame view, int x, int y, float startRadius,
+ float endRadius) {
+ final Animator reveal;
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ reveal = ViewAnimationUtils.createCircularReveal(view, x, y, startRadius, endRadius);
+ } else {
+ view.setClipOutLines(true);
+ view.setClipCenter(x, y);
+ reveal = ObjectAnimator.ofFloat(view, "ClipRadius", startRadius, endRadius);
+ reveal.addListener(new Animator.AnimatorListener() {
+ @Override
+ public void onAnimationStart(Animator animation) {
+
+ }
+
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ view.setClipOutLines(false);
+ }
+
+ @Override
+ public void onAnimationCancel(Animator animation) {
+
+ }
+
+ @Override
+ public void onAnimationRepeat(Animator animation) {
+
+ }
+ });
+ }
+ return reveal;
+ }
+
+}
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/EmergencyButtons.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/EmergencyButtons.java
new file mode 100644
index 0000000..664924f
--- /dev/null
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/EmergencyButtons.java
@@ -0,0 +1,47 @@
+package charlyn23.c4q.nyc.omg;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.telephony.SmsManager;
+import android.view.View;
+
+
+public class EmergencyButtons extends Activity {
+
+
+
+
+ //Sends an SMS message to another device.
+
+ public void textAllYourFamilyMember(String firstFam, String secondFam, String thirdFam){
+ String text = "Please help me, I really need you guys.";
+
+ sendSMS(firstFam,text);
+ sendSMS(secondFam, text);
+ sendSMS(thirdFam,text);
+
+ }
+
+ //pull up the 911 ready to call.
+
+ public void call911(View view){
+ String policeAndFireDep = "911";
+
+ Intent callNineOneOne = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + policeAndFireDep));
+
+
+ if(callNineOneOne.resolveActivity(getPackageManager()) != null){
+ startActivity(callNineOneOne);
+ }
+ }
+
+
+ private void sendSMS(String phoneNumber, String message){
+ SmsManager sms = SmsManager.getDefault();
+ sms.sendTextMessage(phoneNumber, null, message, null, null);
+ }
+
+}
+
+
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/MainActivity.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/MainActivity.java
old mode 100644
new mode 100755
index 8e6fc64..90c176a
--- a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/MainActivity.java
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/MainActivity.java
@@ -1,22 +1,64 @@
package charlyn23.c4q.nyc.omg;
-import android.app.Activity;
import android.content.Intent;
+import android.net.Uri;
import android.os.Bundle;
+import android.support.v7.app.ActionBarActivity;
+import android.view.Menu;
+import android.view.MenuItem;
import android.view.View;
+import android.widget.AbsListView;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+public class MainActivity extends ActionBarActivity implements AbsListView.OnItemClickListener {
-public class MainActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ ListView listView = (ListView) findViewById(R.id.list);
+ listView.setOnItemClickListener(this);
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
+ ArrayAdapter demoAdapter = new ArrayAdapter(this,
+ android.R.layout.simple_list_item_1);
+
+ for (charlyn23.c4q.nyc.omg.Demo demo : charlyn23.c4q.nyc.omg.Demo.values()) {
+ demoAdapter.add(getString(demo.titleResId));
}
- public void settingsOnClick(View view) {
- Intent settingsIntent = new Intent(this, SettingsActivity.class);
- startActivity(settingsIntent);
+ listView.setAdapter(demoAdapter);
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.menu_main, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.menu_github:
+ openGitHub();
+ return true;
+ default:
+ return super.onOptionsItemSelected(item);
}
+ }
+
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ charlyn23.c4q.nyc.omg.Demo demo = charlyn23.c4q.nyc.omg.Demo.values()[position];
+ demo.startActivity(this);
+ }
+
+ private void openGitHub() {
+ Uri uri = Uri.parse(getString(R.string.app_github_url));
+ Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
}
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/SettingsActivity.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/SettingsActivity.java
deleted file mode 100644
index cf8901b..0000000
--- a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/SettingsActivity.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package charlyn23.c4q.nyc.omg;
-
-import android.os.Bundle;
-import android.support.v7.app.ActionBarActivity;
-
-
-public class SettingsActivity extends ActionBarActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_settings);
- }
-
-
-}
diff --git a/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/widget/ClipRevealFrame.java b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/widget/ClipRevealFrame.java
new file mode 100755
index 0000000..9b00384
--- /dev/null
+++ b/OMG/app/src/main/java/charlyn23/c4q/nyc/omg/widget/ClipRevealFrame.java
@@ -0,0 +1,69 @@
+package charlyn23.c4q.nyc.omg.widget;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Path;
+import android.util.AttributeSet;
+import android.widget.FrameLayout;
+
+/**
+ * CircularReveal backport
+ * https://gist.github.com/schwiz/e566f248723bb1754972
+ */
+public class ClipRevealFrame extends FrameLayout {
+
+ boolean clipOutlines;
+ float centerX;
+ float centerY;
+ float radius;
+ private Path revealPath;
+
+ public ClipRevealFrame(Context context) {
+ super(context);
+ init();
+ }
+
+ public ClipRevealFrame(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ public ClipRevealFrame(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ init();
+ }
+
+ private void init() {
+ revealPath = new Path();
+ clipOutlines = false;
+ }
+
+ public void setClipOutLines(boolean shouldClip) {
+ clipOutlines = shouldClip;
+ }
+
+ public void setClipCenter(final int x, final int y) {
+ centerX = x;
+ centerY = y;
+ }
+
+ public void setClipRadius(final float radius) {
+ this.radius = radius;
+ invalidate();
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ if (!clipOutlines) {
+ super.draw(canvas);
+ return;
+ }
+ final int state = canvas.save();
+ revealPath.reset();
+ revealPath.addCircle(centerX, centerY, radius, Path.Direction.CW);
+ canvas.clipPath(revealPath);
+ super.draw(canvas);
+ canvas.restoreToCount(state);
+ }
+
+}
diff --git a/OMG/app/src/main/res/drawable/cyan_oval.xml b/OMG/app/src/main/res/drawable/cyan_oval.xml
new file mode 100755
index 0000000..d57c3f6
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/cyan_oval.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/cyan_oval_pressed.xml b/OMG/app/src/main/res/drawable/cyan_oval_pressed.xml
new file mode 100755
index 0000000..98f5412
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/cyan_oval_pressed.xml
@@ -0,0 +1,9 @@
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/cyan_oval_selector.xml b/OMG/app/src/main/res/drawable/cyan_oval_selector.xml
new file mode 100755
index 0000000..b7257da
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/cyan_oval_selector.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/drawable/green_oval.xml b/OMG/app/src/main/res/drawable/green_oval.xml
new file mode 100755
index 0000000..f4af303
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/green_oval.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/green_oval_pressed.xml b/OMG/app/src/main/res/drawable/green_oval_pressed.xml
new file mode 100755
index 0000000..c0ea7db
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/green_oval_pressed.xml
@@ -0,0 +1,9 @@
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/green_oval_selector.xml b/OMG/app/src/main/res/drawable/green_oval_selector.xml
new file mode 100755
index 0000000..582fde5
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/green_oval_selector.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/drawable/light_blue_oval.xml b/OMG/app/src/main/res/drawable/light_blue_oval.xml
new file mode 100755
index 0000000..17edfce
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/light_blue_oval.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/light_blue_oval_pressed.xml b/OMG/app/src/main/res/drawable/light_blue_oval_pressed.xml
new file mode 100755
index 0000000..636f1d6
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/light_blue_oval_pressed.xml
@@ -0,0 +1,9 @@
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/light_blue_oval_selector.xml b/OMG/app/src/main/res/drawable/light_blue_oval_selector.xml
new file mode 100755
index 0000000..8969aa2
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/light_blue_oval_selector.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/drawable/light_green_oval.xml b/OMG/app/src/main/res/drawable/light_green_oval.xml
new file mode 100755
index 0000000..ee57719
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/light_green_oval.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/light_green_oval_pressed.xml b/OMG/app/src/main/res/drawable/light_green_oval_pressed.xml
new file mode 100755
index 0000000..69813d6
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/light_green_oval_pressed.xml
@@ -0,0 +1,9 @@
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/light_green_oval_selector.xml b/OMG/app/src/main/res/drawable/light_green_oval_selector.xml
new file mode 100755
index 0000000..765fe16
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/light_green_oval_selector.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/drawable/my_button.xml b/OMG/app/src/main/res/drawable/my_button.xml
new file mode 100644
index 0000000..d6b3ad0
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/my_button.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/drawable/path_fab.xml b/OMG/app/src/main/res/drawable/path_fab.xml
new file mode 100755
index 0000000..e478a2f
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/path_fab.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/drawable/path_white_oval.xml b/OMG/app/src/main/res/drawable/path_white_oval.xml
new file mode 100755
index 0000000..317ef82
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/path_white_oval.xml
@@ -0,0 +1,22 @@
+
+
+ -
+
+
-
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/teal_oval.xml b/OMG/app/src/main/res/drawable/teal_oval.xml
new file mode 100755
index 0000000..093d364
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/teal_oval.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/teal_oval_pressed.xml b/OMG/app/src/main/res/drawable/teal_oval_pressed.xml
new file mode 100755
index 0000000..69d0dc2
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/teal_oval_pressed.xml
@@ -0,0 +1,9 @@
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/teal_oval_selector.xml b/OMG/app/src/main/res/drawable/teal_oval_selector.xml
new file mode 100755
index 0000000..c6ba9bf
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/teal_oval_selector.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/drawable/tumblr_blue_oval.xml b/OMG/app/src/main/res/drawable/tumblr_blue_oval.xml
new file mode 100755
index 0000000..634980d
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/tumblr_blue_oval.xml
@@ -0,0 +1,22 @@
+
+
+ -
+
+
-
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/tumblr_green_oval.xml b/OMG/app/src/main/res/drawable/tumblr_green_oval.xml
new file mode 100755
index 0000000..0034041
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/tumblr_green_oval.xml
@@ -0,0 +1,22 @@
+
+
+ -
+
+
-
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/tumblr_grey_oval.xml b/OMG/app/src/main/res/drawable/tumblr_grey_oval.xml
new file mode 100755
index 0000000..973bf2d
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/tumblr_grey_oval.xml
@@ -0,0 +1,22 @@
+
+
+ -
+
+
-
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/tumblr_menu_oval.xml b/OMG/app/src/main/res/drawable/tumblr_menu_oval.xml
new file mode 100755
index 0000000..2376099
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/tumblr_menu_oval.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/drawable/tumblr_orange_oval.xml b/OMG/app/src/main/res/drawable/tumblr_orange_oval.xml
new file mode 100755
index 0000000..67a911b
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/tumblr_orange_oval.xml
@@ -0,0 +1,22 @@
+
+
+ -
+
+
-
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/tumblr_red_oval.xml b/OMG/app/src/main/res/drawable/tumblr_red_oval.xml
new file mode 100755
index 0000000..4ac7e55
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/tumblr_red_oval.xml
@@ -0,0 +1,22 @@
+
+
+ -
+
+
-
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/drawable/tumblr_white_oval.xml b/OMG/app/src/main/res/drawable/tumblr_white_oval.xml
new file mode 100755
index 0000000..8368607
--- /dev/null
+++ b/OMG/app/src/main/res/drawable/tumblr_white_oval.xml
@@ -0,0 +1,22 @@
+
+
+ -
+
+
-
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/OMG/app/src/main/res/layout/activity_main.xml b/OMG/app/src/main/res/layout/activity_main.xml
old mode 100644
new mode 100755
index 750e528..256ea3b
--- a/OMG/app/src/main/res/layout/activity_main.xml
+++ b/OMG/app/src/main/res/layout/activity_main.xml
@@ -1,14 +1,19 @@
-
+
-
-
+
+
+
+
+
diff --git a/OMG/app/src/main/res/layout/activity_settings.xml b/OMG/app/src/main/res/layout/activity_settings.xml
deleted file mode 100644
index 11e3aac..0000000
--- a/OMG/app/src/main/res/layout/activity_settings.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OMG/app/src/main/res/layout/arc_free_angle.xml b/OMG/app/src/main/res/layout/arc_free_angle.xml
new file mode 100755
index 0000000..1e7157b
--- /dev/null
+++ b/OMG/app/src/main/res/layout/arc_free_angle.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OMG/app/src/main/res/layout/arc_large.xml b/OMG/app/src/main/res/layout/arc_large.xml
new file mode 100755
index 0000000..29f6ade
--- /dev/null
+++ b/OMG/app/src/main/res/layout/arc_large.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/layout/arc_medium.xml b/OMG/app/src/main/res/layout/arc_medium.xml
new file mode 100755
index 0000000..f0b310b
--- /dev/null
+++ b/OMG/app/src/main/res/layout/arc_medium.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OMG/app/src/main/res/layout/arc_small.xml b/OMG/app/src/main/res/layout/arc_small.xml
new file mode 100755
index 0000000..05383e2
--- /dev/null
+++ b/OMG/app/src/main/res/layout/arc_small.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OMG/app/src/main/res/layout/like_a_path.xml b/OMG/app/src/main/res/layout/like_a_path.xml
new file mode 100755
index 0000000..150fbc5
--- /dev/null
+++ b/OMG/app/src/main/res/layout/like_a_path.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/layout/like_a_tumblr.xml b/OMG/app/src/main/res/layout/like_a_tumblr.xml
new file mode 100755
index 0000000..cf15b10
--- /dev/null
+++ b/OMG/app/src/main/res/layout/like_a_tumblr.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/menu/menu_demo.xml b/OMG/app/src/main/res/menu/menu_demo.xml
new file mode 100755
index 0000000..ae77d6d
--- /dev/null
+++ b/OMG/app/src/main/res/menu/menu_demo.xml
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/menu/menu_main.xml b/OMG/app/src/main/res/menu/menu_main.xml
index b1cb908..c3b3029 100644
--- a/OMG/app/src/main/res/menu/menu_main.xml
+++ b/OMG/app/src/main/res/menu/menu_main.xml
@@ -1,6 +1,20 @@
+
+
+
diff --git a/OMG/app/src/main/res/menu/menu_maping_.xml b/OMG/app/src/main/res/menu/menu_maping_.xml
new file mode 100644
index 0000000..1ee7684
--- /dev/null
+++ b/OMG/app/src/main/res/menu/menu_maping_.xml
@@ -0,0 +1,7 @@
+
diff --git a/OMG/app/src/main/res/values-w820dp/dimens.xml b/OMG/app/src/main/res/values-w820dp/dimens.xml
deleted file mode 100644
index 63fc816..0000000
--- a/OMG/app/src/main/res/values-w820dp/dimens.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- 64dp
-
diff --git a/OMG/app/src/main/res/values/colors.xml b/OMG/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..40efbb3
--- /dev/null
+++ b/OMG/app/src/main/res/values/colors.xml
@@ -0,0 +1,29 @@
+
+
+ #3c515c
+ #FFFFFF
+ #42000000
+ #33000000
+
+ #03A9F4
+ #00BCD4
+ #009688
+ #4CAF50
+ #8BC34A
+
+ #36465D
+ #F2992E
+ #56BC8A
+ #FFFFFF
+ #748089
+ #4AA8D8
+ #D95E40
+
+ #E62F17
+ #FF9500
+ #1774E6
+ #403B36
+ #5FB336
+ #49098A
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/values/dimens.xml b/OMG/app/src/main/res/values/dimens.xml
index 47c8224..ada4f3f 100644
--- a/OMG/app/src/main/res/values/dimens.xml
+++ b/OMG/app/src/main/res/values/dimens.xml
@@ -1,5 +1,27 @@
-
- 16dp
- 16dp
-
+
+ 192dp
+ 168dp
+ 144dp
+ 135dp
+ 140dp
+
+ 144dp
+ 120dp
+ 96dp
+ 100dp
+ 114dp
+
+ 72dp
+ 48dp
+ 36dp
+ 70dp
+ 36dp
+
+ 32sp
+ 24sp
+ 16sp
+ 30sp
+ 18sp
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/values/ids.xml b/OMG/app/src/main/res/values/ids.xml
new file mode 100755
index 0000000..3162242
--- /dev/null
+++ b/OMG/app/src/main/res/values/ids.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OMG/app/src/main/res/values/strings.xml b/OMG/app/src/main/res/values/strings.xml
index 401aa9e..706bfdf 100644
--- a/OMG/app/src/main/res/values/strings.xml
+++ b/OMG/app/src/main/res/values/strings.xml
@@ -1,7 +1,40 @@
+
+
OMG
- Hello world!
+ License
+ GitHub
+
Settings
SettingsActivity
+ Maping_Activity
+
+ Reverse
+
+ Center
+ Left
+ Right
+ Top
+ Top Left
+ Top Right
+ Bottom
+ Bottom Left
+ Bottom Right
+ Advanced: Free angle
+ Advanced: Like a Tumblr
+ Advanced: Like a Path
+
+ center"
Full arc of from 270 degrees]]>
+ left"
Semi arc of from 270 degrees]]>
+ right"
Semi arc of from 90 degrees]]>
+ top"
Semi arc of from 0 degrees]]>
+ top|left"
Quarter arc of from 0 degrees]]>
+ top|right"
Quarter arc of from 90 degrees]]>
+ bottom"
Semi arc of from 180 degrees]]>
+ bottom|left"
Quarter arc of from 270 degrees]]>
+ bottom|right"
Quarter arc of from 180 degrees]]>
+ true"
Can be free angle to place the child view]]>
+ Try pressing the button
+ Try pressing the button
diff --git a/OMG/app/src/main/res/values/styles.xml b/OMG/app/src/main/res/values/styles.xml
index 766ab99..af55bda 100644
--- a/OMG/app/src/main/res/values/styles.xml
+++ b/OMG/app/src/main/res/values/styles.xml
@@ -2,7 +2,43 @@
+
+
+
+
+
+
+
+
+
+
+
+