Closed GoogleCodeExporter closed 9 years ago
Issue 248 has been merged into this issue.
Original comment by dandrome...@gmail.com
on 8 Jan 2013 at 12:29
Fixed in SVN.
Original comment by dandrome...@gmail.com
on 8 Jan 2013 at 1:35
Just a question: Wouldn't it be better to supress handleTouch until View is
drawn?
Regards
Index: src/org/achartengine/GraphicalView.java
===================================================================
--- src/org/achartengine/GraphicalView.java (revision 439)
+++ src/org/achartengine/GraphicalView.java (working copy)
@@ -78,6 +78,8 @@
private float oldX;
/** The old y coordinate. */
private float oldY;
+ /** Was the view already drawn? AChartEngine Bug #253*/
+ private boolean drawn=false;
/**
* Creates a new graphical view.
@@ -175,8 +177,18 @@
canvas.drawBitmap(zoomOutImage, left + width - zoomSize * 1.75f, buttonY, null);
canvas.drawBitmap(fitZoomImage, left + width - zoomSize * 0.75f, buttonY, null);
}
+ setDrawn();
}
+ private void setDrawn() {
+ drawn=true;
+ }
+
+
+ protected boolean isDrawn() {
+ return drawn;
+ }
+
/**
* Sets the zoom rate.
*
@@ -282,7 +294,7 @@
oldX = event.getX();
oldY = event.getY();
}
- if (mRenderer != null && (mRenderer.isPanEnabled() ||
mRenderer.isZoomEnabled())) {
+ if (mRenderer != null && isDrawn() && (mRenderer.isPanEnabled() ||
mRenderer.isZoomEnabled())) {
if (mTouchHandler.handleTouch(event)) {
return true;
}
Original comment by seidel.b...@googlemail.com
on 9 Jan 2013 at 1:24
I have added the code you suggested. However, I will keep the code I added
before as well as I am not sure that was only happening on pan or zoom.
Original comment by dandrome...@gmail.com
on 9 Jan 2013 at 1:37
Issue 248 has been merged into this issue.
Original comment by dandrome...@gmail.com
on 19 Mar 2013 at 7:38
Original issue reported on code.google.com by
christia...@gmail.com
on 28 Oct 2012 at 5:17