title: How to make animation when I use canvas
body: <p>For example: <code>myPos.getCoordX()</code> is 0 and <code>myPos.getCoordY()</code> is 0 </p>
  
  <p>When I update the variable, <code>myPos.getCoordX()</code> is 50 and <code>myPos.getCoordY()</code> is 100 </p>
  
  <p>Then I call the <code>showPosition()</code> method again.</p>
  
  <p>I want to: start a moving animation from 0,0 to 50,100</p>
  
  <pre><code>private void showPosition() {
          Bitmap floorPlan = BitmapFactory.decodeResource(getResources(),
                  R.drawable.wallpaper).copy(Bitmap.Config.ARGB_4444, true);
          Bitmap point = BitmapFactory.decodeResource(getResources(),
                  R.drawable.ic_launcher).copy(Bitmap.Config.ARGB_4444, true);
          Bitmap PositionOnFloorplan = overlay(floorPlan, point);
  
  
          // 1
          PositionOnFloorplan = floorPlan.copy(Bitmap.Config.ARGB_8888, true);
  
          Canvas canvas = new Canvas(PositionOnFloorplan);
          canvas.drawBitmap(point, (float) (myPos.getCoordX()),
                  (float) (myPos.getCoordY()), null);
  
          ImageView imageView = (ImageView) findViewById(R.id.imggg);
          imageView.setAdjustViewBounds(true);
          imageView.setImageBitmap(PositionOnFloorplan);
  
      }
  
  
      private Bitmap overlay(Bitmap floorPlan, Bitmap point) {
          Bitmap bmOverlay = Bitmap.createBitmap(floorPlan.getWidth(),
                  floorPlan.getHeight(), floorPlan.getConfig());
          Canvas canvas = new Canvas(bmOverlay);
          canvas.drawBitmap(floorPlan, new Matrix(), null);
          canvas.drawBitmap(point, (float) (myPos.getCoordX()),
                  (float) (myPos.getCoordY()), null);
          return bmOverlay;
      }
  </code></pre>