title: How to make a transition effect for 3d rotation on canvas
body: <p>I have sequence of images and want to create a transition effect as part of LiveWallpaper animation - something like to 3d rotation on Canvas (without OpenGL ES).</p>
  
  <p>The code snippet is:</p>
  
  <pre><code>case 15: {/* Vertical rotation left*/
          canvas.drawBitmap(mPreviousBitmap, 0, 0, myPaint);
          holder.unlockCanvasAndPost(canvas);
          Camera mCamera = new Camera();
          Matrix matrix = new Matrix();
          mCamera.save();
          for (int i = 0; i &gt; -90;) {
                  canvas = holder.lockCanvas();
                  canvas.drawColor(Color.BLACK);
                  mCamera.rotateY(-5);
                  mCamera.getMatrix(matrix);
                  //dss is Device Screen Size structure where the relevant parameters stored
                  matrix.preTranslate(-dss.getWidth() / 2, -dss.getHeight() / 2);
                  matrix.postTranslate(dss.getWidth() / 2, dss.getHeight() / 2);
                  canvas.drawBitmap(mPreviousBitmap, matrix, myPaint);
                  holder.unlockCanvasAndPost(canvas);
                  i -= 5;
          }
          mCamera.rotateY(180);
          mCamera.getMatrix(matrix);
          for (int i = 0; i &gt; -90;) {
                  canvas = holder.lockCanvas();
                  canvas.drawColor(Color.BLACK);
                  mCamera.rotateY(-5);
                  mCamera.getMatrix(matrix);
                  matrix.preTranslate(-dss.getWidth() / 2, -dss.getHeight() / 2);
                  matrix.postTranslate(dss.getWidth() / 2, dss.getHeight() / 2);
                  canvas.drawBitmap(mBitmap, matrix, myPaint);
                  holder.unlockCanvasAndPost(canvas);
                  i -= 5;
          }
          mCamera.restore();
          mLastDrawTime = System.currentTimeMillis();
          break;
  }
  </code></pre>
  
  <p>I tested it with 11 different devices</p>
  
  <pre><code>Asus Transformer TF700T, Samsung Galaxy S4 I9500, Samsung I9082, LG p715, HTC Desire SV T326e, Sony Xperia Z1 C6902, Huawei Ascend Y511-U30, HTC Sensation XL x315e, HTC Desire 300, Fly IQ431 and Motorola Moto G.
  </code></pre>
  
  <p>This code works fine everywhere except my tablet <code>Asus Transformer TF700T</code>. With my tablet there being observed an abnormal behaviour: at the moment between the first image is going off and the next image appearing, I see the following state:
  <a href="http://i-fotki.info/16/842cc7c2d59483650edfd5de48c6a3464e1a97174989084.jpg.html" rel="nofollow">http://i-fotki.info/16/842cc7c2d59483650edfd5de48c6a3464e1a97174989084.jpg.html</a></p>
  
  <p>But with other devices my images are changed fluently.</p>
  
  <p>So what is incorrect in my code and what I should change?</p>