read
Get the screen size see: Get screen size
<pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"> float screenWidth = ...
</pre>
float screenHeight = ...
Matrix matrix = new Matrix();
<div class="p1">
matrix.postRotate(accelY * 10.0f, imageMiddleWidth, imageMiddleHeight);</div>
<div class="p1">
matrix.postTranslate(posX, posY);</div>
<div class="p1">
</div>
canvas.drawBitmap(bitmap, matrix, null);