Android 旋转ImageView

        imageView = findViewById(R.id.im_image);
        Matrix m = new Matrix();
        m.setRotate(180);
        Bitmap bitmap = ((BitmapDrawable) getResources().getDrawable(R.drawable.image)).getBitmap();
        bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(),bitmap.getHeight(), m, true);
        imageView.setImageBitmap(bitmap);

参考:https://www.jb51.net/article/71928.htm

猜你喜欢

转载自blog.csdn.net/qq_27494201/article/details/127655252