```
public void Rotate(View v)
{
    ImageView img = (ImageView)findViewById(R.id.imageView1);
    Bitmap bmp = BitmapFactory.decodeResource(getResources(),arr[current]);

 // Getting width & height of the given image.
    int w = bmp.getWidth();
    int h = bmp.getHeight();
 // Setting pre rotate to 90
    Matrix mtx = new Matrix();
    mtx.preRotate(90);
 // Rotating Bitmap
    Bitmap rotatedBMP = Bitmap.createBitmap(bmp, 0, 0, w, h, mtx, true);
    BitmapDrawable bmd = new BitmapDrawable(rotatedBMP);
    img.setImageBitmap(rotatedBMP);
}

```

when i select rotate option in menu it only rotates first time when i again select it, image wont rotate. any soln to it