you need to override the DispatchDraw and the DispatchTouchEvent calls.
Something like this
private Matrix mMatrix = new Matrix();
private float[] mTemp = new float[2];
@Override
protected void dispatchDraw(Canvas canvas) {
canvas.save(Canvas.MATRIX_SAVE_FLAG);
canvas.rotate(90f, getWidth() * 0.5f, getHeight() * 0.5f);
mMatrix.setRotate(90f, getWidth() * 0.5f, getHeight() * 0.5f);
super.dispatchDraw(canvas);
canvas.restore();
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
mTemp[0] = event.getX();
mTemp[1] = event.getY();
mMatrix.mapPoints(mTemp);
event.setLocation(mTemp[0], mTemp[1]);
return super.dispatchTouchEvent(event);
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en