I\'m working with android project in which I want to rotate image along with touch to some fix pivot point. I have completed all these things but I am facing one problem: Wh
The problem has to do with applying your Bitmap to the ImageView. Create a BitmapDrawable first, then apply. There are some scaling problems that occur if you don't. I'm not sure why, maybe someone else could provide insight. I ran into the same problem when creating a compass app and came to this thread on a search, so I thought I would update with the fix that worked.
int rotation = (int) Math.toDegrees(r);
Matrix matrix = new Matrix();
matrix.postRotate(rotation);
source = Bitmap.createBitmap(currentBitmap, 0, 0, currentBitmap.getWidth(), currentBitmap.getHeight(), matrix, false);
*BitmapDrawable newBmd = new BitmapDrawable(source);
imageView.setImageDrawable(newBmd);*
imageView.setScaleType(ScaleType.CENTER);