cybergen
cybergen

Reputation: 3157

View clipped on rotation animation on Y axis when perpendicular to screen

I have a Fragment (from the support library) containing a View with a flip animation (compatible to Gingerbread). This View contains two Views, one for the front page and one for the back page. The "PageViews" are hidden or shown at 90°, according to the angle of the flipped parent view. The flip animation is triggered by move events. It's kind of flipping a book page - the page sticks to the finger. However at some point, when the View is rotated allmost perpendicular to the screen, the view disapears. It seems to be clipped due to crossing the near clipping plane.

Is there a way to change the near clipping or otherwise work around this issue (maybe flatten the view hirarchy?)? Or should those things better be done with OpenGL ES?

Upvotes: 2

Views: 544

Answers (1)

cybergen
cybergen

Reputation: 3157

The issue can be worked around by setting the desired image as the background of the flipping view/layout instead putting an ImageView on top. So it's not the flipping view itself being clipped. The views on top are clipped if they reach the borders of their flipping parent. I think the issue appears only for large views being flipped (e.g. the whole screen).

Upvotes: 1

Related Questions