diff options
author | DavisLWebb <davislwebb@ymail.com> | 2014-05-06 21:48:40 -0400 |
---|---|---|
committer | DavisLWebb <davislwebb@ymail.com> | 2014-05-06 21:48:40 -0400 |
commit | f27edb06cae88115d1ee6c122a15ec750e8db5f0 (patch) | |
tree | e2ef6ab1263437244533f965187dd97f2612c5cb /src/us/minak/IMEGestureOverlayView.java | |
parent | 5badea811573367bc80b2601209f0bea5c4bc2f8 (diff) | |
parent | 1abc4527631be867cb0da780b6a3de6d28aa1f12 (diff) |
Merge branch 'master' of https://github.com/AndrewMurrell/minak
Diffstat (limited to 'src/us/minak/IMEGestureOverlayView.java')
-rw-r--r-- | src/us/minak/IMEGestureOverlayView.java | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/us/minak/IMEGestureOverlayView.java b/src/us/minak/IMEGestureOverlayView.java index 011df3e..1a88cd6 100644 --- a/src/us/minak/IMEGestureOverlayView.java +++ b/src/us/minak/IMEGestureOverlayView.java @@ -12,7 +12,6 @@ package us.minak; -import java.util.LinkedList; import java.util.List; import android.content.Context; @@ -22,6 +21,8 @@ import android.gesture.GestureOverlayView; import android.gesture.GestureOverlayView.OnGesturePerformedListener; import android.gesture.Prediction; import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; import android.util.AttributeSet; /** @@ -31,7 +32,6 @@ public class IMEGestureOverlayView extends GestureOverlayView implements OnGestu private static final double SCORE_TRESHOLD = 3.0; private final GestureLibrary mGestureLibrary; private StringReciever mOnGestureRecognizedListener; - public List<MetaCircle> circles = new LinkedList<MetaCircle>(); public IMEGestureOverlayView(Context context, AttributeSet attrs) { super(context, attrs); @@ -56,19 +56,22 @@ public class IMEGestureOverlayView extends GestureOverlayView implements OnGestu mOnGestureRecognizedListener.putString(bestPrediction.name); } else { clear(false); - drawCircles((MetaCircle[]) this.circles.toArray()); } } } - + private final Paint mPaintRed = new Paint(); + private final Paint mPaintBlue = new Paint(); public void onDraw(Canvas canvas) { - canvas.getHeight(); - } - - public void drawCircles (MetaCircle[] circles) { - for (MetaCircle circle : circles) { - //draw circle - ; - } + mPaintRed.setColor(Color.RED); + mPaintBlue.setColor(Color.BLUE); + canvas.drawCircle( + 0F/*(float)(canvas.getWidth()/2.0)*/, + 0F/*(float)(canvas.getHeight()/2.0)*/, + 10F, + mPaintRed); + canvas.drawLine(0, 0, + canvas.getWidth(), + canvas.getHeight(), + mPaintBlue); } } |