I'm trying to use the android.graphics.camera package to rotate a
bitmap in 3d (about the y-axis) on a canvas. Here is the code that
does the transformation:
I got this code from the ApiDemos example code
(Rotate3dAnimation.java). The problem is that at angles within 15
degrees from perpendicular to the screen (looking at the bitmap close
to edge on, when the rotate variable is between 75 and 105 degrees),
the bitmap disappears. However, if I get rid of the m.postTranslate()
call, the bitmap doesn't disappear at all (it's now just centered
about left side of the screen). The bitmap is drawn with a call to
canvas.drawBitmap(). Has anyone else had a similar problem? Is there
any other way to do a 3d rotation without using OpenGL? Or should I
change the card into an imageView and use the animation framework?
Thanks for any help.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at