Moving a ball parabola in android
<p>On starting the app :   A ball freely falls from the top-left corner with some nominal horizontal velocity and zero vertical velocity onto the floor   with a certain restitution coefficient and bounces upwards and moves forward in the same parabolic manner as in real life   with constant horizontal velocity. This is repeated till it bounces 2-3 times and goes off the screen from the right.     You can choose to execute it in either the vertical or horizontal positioning  of the mobile or also make the app sensitive to the positioning.</p>

<pre><code>private void update() {  
    ballX += xSpeed; 
    ballY += ySpeed; 
    if (ballX- ballRadius &gt;=xMax) { 
        //xSpeed = -xSpeed; 
        xSpeed=0; 
        ySpeed=0; 
        ballX=xMax+ballRadius; 
        //System.out.println("in x if loop"+xMax); 
    } else if (ballX - ballRadius &lt; xMin) { 
        xSpeed = -xSpeed; 
        ballX = xMin+ballRadius; 
        ySpeed=5; 
        System.out.println("in x else if loop"); 
    } 
}
</code></pre>
