From 51d12bfbe37c6185d10c11e43ccb3289bd8a977a Mon Sep 17 00:00:00 2001 From: nfoy Date: Tue, 6 May 2014 22:24:18 -0400 Subject: Davis assured that this is right. --- res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index a446fb0..d3352bc 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -38,7 +38,7 @@ Shift - &x2190; + Space -- cgit v1.2.3-54-g00ecf From a0ac4d4cf9e31bbe019d29ddb6f514a9e3edcc73 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 6 May 2014 22:26:11 -0400 Subject: Added MetaCircle handling for key modification, but this needs to be fixed. BREAKS THINGS. --- res/values/strings.xml | 2 +- src/us/minak/IMEView.java | 22 ++++++---------------- src/us/minak/MetaCircle.java | 12 ++++++++++-- src/us/minak/MetaExpression.java | 2 +- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index a446fb0..d3352bc 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -38,7 +38,7 @@ Shift - &x2190; + Space diff --git a/src/us/minak/IMEView.java b/src/us/minak/IMEView.java index 7cdf4fd..0f40325 100644 --- a/src/us/minak/IMEView.java +++ b/src/us/minak/IMEView.java @@ -13,8 +13,6 @@ package us.minak; import java.util.LinkedList; -import java.util.List; -import java.util.Locale; import java.util.Queue; import android.content.Context; @@ -184,20 +182,12 @@ public class IMEView extends RelativeLayout { * The character to enter */ private void enterCharacter(String character) { - //for each circle in circles check to see if the touch was in the circle and apply the meta-key - switch (mShiftState) { - case OFF: - mOnCharacterEnteredListener.putString(character); - break; - case ON: - mOnCharacterEnteredListener.putString(character.toUpperCase(Locale.ENGLISH)); - shift(); - break; - case CAPS_LOCK: - mOnCharacterEnteredListener.putString(character.toUpperCase(Locale.ENGLISH)); - break; - default: - throw new IllegalArgumentException(); + for (MetaCircle circle : ((IMEGestureOverlayView) findViewById(R.id.drawing_space)).circles) { + //go through circles and check if they are applicable + if (circle.containsPoint(this.x, this.y) && circle.getMetaExpression().state != MetaExpression.State.ON) { + //TODO: apply the Meta-key here + ; + } } } } diff --git a/src/us/minak/MetaCircle.java b/src/us/minak/MetaCircle.java index 908842a..9139dc9 100644 --- a/src/us/minak/MetaCircle.java +++ b/src/us/minak/MetaCircle.java @@ -5,7 +5,7 @@ package us.minak; * */ public class MetaCircle { - public MetaExpression metaExpr; + private MetaExpression metaExpression; public float x; public float y; public float radius; @@ -14,7 +14,7 @@ public class MetaCircle { public int expansion; //the level of expansion (if multiple circles are expanded, this decides precidence) MetaCircle(float x, float y, float radius, int color, MetaExpression metaExpr) { - this.metaExpr = metaExpr; + this.setMetaExpression(metaExpr); this.x = x; this.y = y; this.radius = radius; @@ -26,4 +26,12 @@ public class MetaCircle { public boolean containsPoint(float x, float y) { return Math.pow(x - this.x, 2) + Math.pow(y - this.y, 2) < Math.pow(this.radius, 2) ? true : false; } + + public MetaExpression getMetaExpression() { + return metaExpression; + } + + public void setMetaExpression(MetaExpression metaExpr) { + this.metaExpression = metaExpr; + } } diff --git a/src/us/minak/MetaExpression.java b/src/us/minak/MetaExpression.java index 4398c42..f9c6cbe 100644 --- a/src/us/minak/MetaExpression.java +++ b/src/us/minak/MetaExpression.java @@ -1,7 +1,7 @@ package us.minak; public class MetaExpression { - public enum State { + public static enum State { ON, OFF, LOCK } -- cgit v1.2.3-54-g00ecf From 6d5d5a3eef46d9f6bba30ddd87e8dfad0ba73ca0 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 6 May 2014 22:28:49 -0400 Subject: ON should be OFF --- src/us/minak/IMEView.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/us/minak/IMEView.java b/src/us/minak/IMEView.java index 1b09af9..318abd0 100644 --- a/src/us/minak/IMEView.java +++ b/src/us/minak/IMEView.java @@ -20,7 +20,6 @@ import android.graphics.Color; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; -import android.widget.Button; import android.widget.RelativeLayout; /** @@ -95,12 +94,11 @@ public class IMEView extends RelativeLayout { private void enterCharacter(String character) { for (MetaCircle circle : ((IMEGestureOverlayView) findViewById(R.id.drawing_space)).circles) { //go through circles and check if they are applicable - if (circle.containsPoint(this.x, this.y) && circle.getMetaExpression().state != MetaExpression.State.ON) { + if (circle.containsPoint(this.x, this.y) && circle.getMetaExpression().state != MetaExpression.State.OFF) { //TODO: apply the Meta-key here ; } } - mOnCharacterEnteredListener.putString(character); } } -- cgit v1.2.3-54-g00ecf From f5956625b9086ae719da90095f050403e5e71764 Mon Sep 17 00:00:00 2001 From: nfoy Date: Tue, 6 May 2014 22:30:20 -0400 Subject: Updated Documentation --- 1251.odp | Bin 11501 -> 47734 bytes 1251.pdf | Bin 0 -> 348429 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 1251.pdf diff --git a/1251.odp b/1251.odp index 0324f2d..b99c728 100644 Binary files a/1251.odp and b/1251.odp differ diff --git a/1251.pdf b/1251.pdf new file mode 100644 index 0000000..ca98eb0 Binary files /dev/null and b/1251.pdf differ -- cgit v1.2.3-54-g00ecf