why my location changing even if i set the coordinates?
<p>I'm developing a floating joystick app, which takes user's current location and when user clicks up button latitude, longitude values will be changed. Then this changed location will be set as current location and so on. Same for the left, right, down button.</p>

<p>When I click any button for the first time it changes coordinates value and my location changes in google map but the problem is if I press any other button I again move back to my original location. I don't know why this is happening.</p>

<p>This is my code:</p>

<pre><code>      double i=0.000100;

wm = (WindowManager) getSystemService(WINDOW_SERVICE);
LayoutInflater inflater = LayoutInflater.from(getApplicationContext());
mInview = (RelativeLayout)inflater.inflate(R.layout.myarrow, null, false);

    RelativeLayout.LayoutParams layoutParameteres = new    RelativeLayout.LayoutParams(
       RelativeLayout.LayoutParams.WRAP_CONTENT,                                      
       RelativeLayout.LayoutParams.WRAP_CONTENT);

 mInview.setLayoutParams(layoutParameteres);

 final WindowManager.LayoutParams parameters = new     WindowManager.LayoutParams(
        600, 400, WindowManager.LayoutParams.TYPE_PHONE,
        WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
        PixelFormat.TRANSLUCENT);

     wm.addView(mInview, parameters);
mInview.setOnTouchListener(new View.OnTouchListener() {
 WindowManager.LayoutParams updatedParameters = parameters;


   @Override
    public boolean onTouch(View v, MotionEvent event) {

            }
});

   mInview.findViewById(R.id.left).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
    gps = new Gpsmap(FloatingWindow.this);

        if(gps.canGetLocation()) {
             latitude = gps.getLatitude() ;
            longitude = gps.getLongitude()-i;
            i=i-0.000050;
            mockGPS = new      MockLocationProvider(LocationManager.GPS_PROVIDER, FloatingWindow.this);
               mockGPS.pushLocation(latitude, longitude,50.0, 50);
                  } else {
            gps.showSettingsAlert();
        }
}
  });

     mInview.findViewById(R.id.down).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
   gps = new Gpsmap(FloatingWindow.this);

        if(gps.canGetLocation()) {
             latitude = gps.getLatitude()-i;
            longitude = gps.getLongitude();
            i=i-0.000050;
            mockGPS = new MockLocationProvider(LocationManager.GPS_PROVIDER, FloatingWindow.this);
               mockGPS.pushLocation(latitude, longitude,50.0, 50);

    }   else {
        gps.showSettingsAlert();
    }
    }
});

    mInview.findViewById(R.id.right).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
  gps = new Gpsmap(FloatingWindow.this);

        if(gps.canGetLocation()) {
             latitude = gps.getLatitude();
            longitude = gps.getLongitude()+i;
            i=i+0.0000010;
            mockGPS = new MockLocationProvider(LocationManager.GPS_PROVIDER, FloatingWindow.this);
               mockGPS.pushLocation(latitude, longitude,50.0, 50);

        }   else {
            gps.showSettingsAlert();

    }

    }
});

     mInview.findViewById(R.id.up).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
  gps = new Gpsmap(FloatingWindow.this);

        if(gps.canGetLocation()) {
             latitude = gps.getLatitude()+i;
            longitude = gps.getLongitude();
            i=i+0.000010;
            mockGPS = new      MockLocationProvider(LocationManager.GPS_PROVIDER, FloatingWindow.this);
               mockGPS.pushLocation(latitude, longitude,50.0, 50);

        }   else {
            gps.showSettingsAlert();

    }

    }
});
</code></pre>