Rotation 旋转时如何填充图像

Rotation 旋转时如何填充图像,rotation,Rotation,旋转图像时,图像下有一个空白 如何填充图像?没有空白 如果我使用'scaleType:fitxy',则移动(缩小、放大)无效 对不起,我的英语不好 xml: 图片框 android:id=“@+id/image” android:layout\u gravity=“fill\u vertical” android:layout\u width=“fill\u parent” android:layout\u height=“fill\u parent” android:adjustViewBou

旋转图像时,图像下有一个空白

如何填充图像?没有空白

如果我使用'scaleType:fitxy',则移动(缩小、放大)无效

对不起,我的英语不好

xml: 图片框 android:id=“@+id/image” android:layout\u gravity=“fill\u vertical” android:layout\u width=“fill\u parent” android:layout\u height=“fill\u parent” android:adjustViewBounds=“true” android:scaleType=“矩阵”

轮换:

private Bitmap getImageProcess(Bitmap bmp, int nRotate, int viewW, int viewH) {

    Matrix matrix = new Matrix();

    matrix.postRotate(nRotate); 

    Bitmap rotateBitmap = Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(),
            bmp.getHeight(), matrix, true);

      return rotateBitmap;

}

如果要填充形状,请尝试使用命令填充整个形状。如果它最终填充了整个屏幕,则可能是您将填充的起点放在了错误的区域