From ec03c38576dfc6fd3fa85ed4744efe898bcf51c4 Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Tue, 6 May 2014 21:33:13 -0400 Subject: backspace arrow added --- res/values/strings.xml | 2 +- src/us/minak/IMEView.java | 39 --------------------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 256a9b8..a446fb0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -38,7 +38,7 @@ Shift - Backspace + &x2190; Space diff --git a/src/us/minak/IMEView.java b/src/us/minak/IMEView.java index 8bf1967..724d69d 100644 --- a/src/us/minak/IMEView.java +++ b/src/us/minak/IMEView.java @@ -13,14 +13,11 @@ package us.minak; import java.util.LinkedList; -import java.util.List; import java.util.Locale; import java.util.Queue; import android.content.Context; -import android.graphics.Color; import android.util.AttributeSet; -import android.view.MotionEvent; import android.view.View; import android.widget.Button; import android.widget.RelativeLayout; @@ -34,26 +31,6 @@ public class IMEView extends RelativeLayout { private Button mShiftButton; private ShiftState mShiftState = ShiftState.OFF; private final Queue mSymbolsQueue = new LinkedList(); - private float x; - private float y; - private boolean ongoingGesture = false; - - public boolean setTouchLocation(float x, float y) { - if (!ongoingGesture) { - this.x = x; - this.y = y; - return true; - } - return false; - } - - public void setState(boolean state) { - ongoingGesture = state; - } - - public boolean getState() { - return ongoingGesture; - } private enum ShiftState { OFF, ON, CAPS_LOCK @@ -84,11 +61,6 @@ public class IMEView extends RelativeLayout { final Button spaceButton = (Button) findViewById(R.id.space_btn); spaceButton.setOnClickListener(mButtonClickListener); spaceButton.setOnLongClickListener(mButtonLongClickListener); - - //dynamic MetaCircle adding stuff here. replace null with Shift or Ctrl or Meta or Alt or Hyper or whatever. - drawingSpaceView.circles.add(new MetaCircle((float)50.0, (float)50.0, (float)20.0, Color.RED, new MetaExpression(null))); - drawingSpaceView.circles.add(new MetaCircle((float)70.0, (float)70.0, (float)20.0, Color.RED, new MetaExpression(null))); - drawingSpaceView.circles.add(new MetaCircle((float)50.0, (float)30.0, (float)20.0, Color.RED, new MetaExpression(null))); } public void setOnCharacterEnteredListener(StringReciever onCharacterEnteredListener) { @@ -147,13 +119,6 @@ public class IMEView extends RelativeLayout { } }; - private final OnTouchListener mOnTouchListener = new OnTouchListener() { - @Override - public boolean onTouch(View v, MotionEvent event) { - return setTouchLocation(event.getX(), event.getY()); - } - }; - /** * Changes shift state to the next one (OFF -> ON -> CAPS LOCK). */ @@ -183,7 +148,6 @@ 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); @@ -199,7 +163,4 @@ public class IMEView extends RelativeLayout { throw new IllegalArgumentException(); } } - - - } -- cgit v1.2.3-54-g00ecf