title: how to animate a Bitmap image with motion in android
body: <blockquote>
    <p>Score is a drawable image </p>
  </blockquote>
  
  <pre><code>private Bitmap Scores;
  private boolean running =true;
  private SurfaceView mySurfaceHolder;
  Scores.decodeResource(myContext.getResource(), R.drawable.score);
  
  //this is just the run procedure
  @Override 
  public void onRun()
  {
     while(running){
  
         Canvas c = null;
       try{
           c = mySurfaceHolder.lockCanvas(null);
                synchronize(mySurfaceHolder){           
                          drawScore(c);  //here is where i call my method..
                }
        }finally{
           mySurfaceHolder.unlockCanvasAndPost(c);
  
    }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>  //the pontsGain and onTitle are both boolean variables so please don't get confuse
    //and pointScoreAtY is an integer that will allocate my specific position in screen
    private void drawScore(Canvas c)
    {
        try{
            if(pointsGain &amp;&amp; !onTitle)
          {
                pointScoreAtY = (int)(FingerY -(Scores.getHeight()/2)-100);
  
                int i=100;
              do{
              try{
  
                  c.drawBitmap(Scores, (FingerX -(Scores.getWidth()/2))+200,pointScoreAtY, null);
                  invalidate();
                   pointScoreAtY -=i;
  
              }catch(Exception e){}
              }while(i--&gt;0);
              pointsGain = false;
          }
        }catch(Exception e){}
    }
  </code></pre>
  
  <blockquote>
    <p>This specific function is drawing a bitmap into the screen at current location but it is not what i am looking to do... for example my main goal is when a character on my game gets hit i want to show a scorePoint and animate it so that it can go up and disappear from screen. </p>
  </blockquote>