I've been searching a lot, but I can't get a solution for my problem. I can't use android:rotation
as I want this app to be compatible with Android API under 11 version.
My problem is something similar to this: Rotating a view in Android
I've done this:
@Override
public void draw(Canvas canvas) {
canvas.save();
Drawable d = getDrawable();
canvas.rotate(-10, d.getIntrinsicWidth() / 2, d.getIntrinsicHeight() / 2);
super.draw(canvas);
canvas.restore();
}
The ImageView is part of a RelativeLayout where I place the image and some text.
But the image is cropped in the edges. How can I avoid that?