0
votes

when rotate an image, there is a blank under an image

how to fill an image? no blank

if i use 'scaleType:fitxy', it do not work to move(reduce, enlarge)

sorry for my bad english ;;

xml: ImageView android:id="@+id/image" android:layout_gravity="fill_vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:adjustViewBounds="true" android:scaleType="matrix"

rotate :

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;

}
1

1 Answers

0
votes

If you're trying to fill in a shape then try using a command to fill in the entire shape. If it ends up filling the whole screen, it may be that you've placed the starting point for the filling in the wrong area.