summaryrefslogtreecommitdiff
path: root/src/us/minak/IMEView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/us/minak/IMEView.java')
-rw-r--r--src/us/minak/IMEView.java22
1 files changed, 6 insertions, 16 deletions
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
+ ;
+ }
}
}
}