title: Android: Rotate image in imageview by an angle
body: <p>I am using the following code to rotate a image in ImageView by an angle. Is there any simpler and less complex method available.</p>
  
  <pre><code>ImageView iv = (ImageView)findViewById(imageviewid);
  TextView tv = (TextView)findViewById(txtViewsid);
  Matrix mat = new Matrix();
  Bitmap bMap = BitmapFactory.decodeResource(getResources(),imageid);
  mat.postRotate(Integer.parseInt(degree));===&gt;angle to be rotated
  Bitmap bMapRotate = Bitmap.createBitmap(bMap, 0, 0,bMap.getWidth(),bMap.getHeight(), mat, true);
  iv.setImageBitmap(bMapRotate);
  </code></pre>