title: How to move and rotate a bitmap in a canvas using a matrix in android/java?
body: <p>I am trying to create an animation where a bitmap is supposed to fall from top of the screen to the bottom while rotating around itself.</p>
  
  <pre><code>for(int i=0;i&lt;MAX;i++){
      posY[i]+=10;
      matrix[i].setTranslate(posX[i],posY[i]);
      matrix[i].postRotate(10);
      c.drawBitmap(lethal[i],matrix[i],null);
  
      if(posY[i]&gt;screenY){
          posY[i] =(float) (Math.random() * screenY *-3);
          posX[i] = (float) (Math.random() * screenX);
      }
  }
  </code></pre>
  
  <p>However, when i do this, the matrix starts to move other directions. I want the movement to be straight from top to bottom, but image itself rotate.</p>