Skip to content Skip to sidebar Skip to footer

Rotate Image Around A Center Of Another Image

I have rotated a dial around its center with the helop from the link below: http://mobile.tutsplus.com/tutorials/android/android-sdk-creating-a-rotating-dialer/ Now I have an icon

Solution 1:

Try only rotate with peopleOrg width and height.

nMatrix.postRotate(degrees, peopleOrg.getWidth()/2, peopleOrg.getHeight()/2);

Update :

Now that you let me know that your logo should be a clickable view, merging the logo image with your dialer is not applicable. To rotate the logo view around the center of dialer you should be actually calculating the (top,left) point for your logo view and moving it around, than just rotating it.

Use sine and cosine functions to get the point on the circumference of an imaginary circle for drawing your logo view.

This post will help you with calculations : How do I calculate a point on a circle’s circumference?

Post a Comment for "Rotate Image Around A Center Of Another Image"