Android webview里面是放着svg格式的图片 我向让这个图片旋转起来 webview控件不动 就里面的图片内容旋转 求大神指导?
http://stackoverflow.com/questions/24031165/360-degree-image-rotation-in-webview-in-titanium-3-2-3
1、webview所在的activity设置横屏或竖屏不切换
2、通过传感器判断方向,不过这最好用手机测试一下,不同的手机有些传感器不起作用。
public static Bitmap rotate(Bitmap bitmap, float degrees) {
Matrix matrix = new Matrix();
matrix.postRotate(degrees);
int width = bitmap.getWidth();
int height = bitmap.getHeight();
return Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true);
}