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);
}
当我在菜单中选择旋转选项时,它只是第一次旋转时,我再次选择它,图像不会旋转。任何soln它只旋转一次图像。在菜单项列表中多次选择旋转选项时如何再次旋转?
这是哪种编程语言/平台? –