title: Rotating an image around a pivot point
body: <p>The issue is simple: I want to rotate an image around a certain pivot point. Here is the code I use: </p>
  
  <pre><code>Matrix matrix = new Matrix();
  matrix.setTranslate(bmpWidth/2, 0);
  matrix.preRotate(degrees, bmpWidth/2, 0);
  
  Bitmap resizedBitmap = Bitmap.createBitmap(
      bitmap, 0, 0, bmpWidth, bmpHeight, matrix, true);
  ImageView imageView = (ImageView) findViewById(R.id.bell);
  imageView.setImageBitmap(resizedBitmap);
  </code></pre>
  
  <p>I get the rotation degrees from the accelerometer sensor. The result is that every time the image is rotated around its center point.</p>