tags:

views:

23

answers:

0
    Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.arw2);
    int w = bmp.getWidth();
    int h = bmp.getHeight();
    float px = 160,py = 215;
    Matrix mtx = new Matrix();
mtx.setRotate(rAngle, px, py);
Bitmap rotatedBMP = Bitmap.createBitmap(bmp, 0, 0, w, h, mtx, true);
BitmapDrawable bmd = new BitmapDrawable(rotatedBMP);
myImageView.setImageDrawable(bmd);

Here is my code.I'm trying to rotate image at fix point but the image rotate at its top left position.I've tried rotateAnimation it works fine but problem is when I again rotate my image it start rotating from original position.so please help me what I'm doing wrong.Thanks