title: Android Canvas restore not working after translate
body: <p>I'm developing a 2D Android application using Canvas. I have several screens, and each one of them have a different coordinate origin. To implement this, I'm currently using Canvas.translate(x, y). When the application starts, I call canvas.save() to store the original state. When I move to a screen, I need to reset the canvas translation and then apply a new one, so the new translation is relative to the original 0,0. Basically when entering a new screen, I call:</p>
  
  <pre><code>canvas.restore();      //to undo the current translation
  canvas.save();         //to save again the original state of canvas
  canvas.translate(x, y) //to apply the needed translation
  </code></pre>
  
  <p>I works just fine for the first screen, but for the second, apparently the call to restore() isn't rolling back the translation and the translations are being made relative to the previous one.</p>
  
  <p>Am I missing something?</p>