Moving a ball with help of accelerometer in android?

I guess your problem is that you assume that the sensor origin (x=0,y=0) is the screen center. The sensor origin is the top left corner of the screen (X pointing left and Y pointing down), so comparing a & be to canvas.getWidth() & canvas.getHeight() is not correct since you already added centerX & centerY . Also, negating sensorX will cause the condition a > canvas.getWidth() to never occur since X is never negative.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions