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它只旋轉一次圖像。在菜單項列表中多次選擇旋轉選項時如何再次旋轉?
這是哪種編程語言/平臺? –