Hi Vince
I'm not sure if this is your problem ro if you are doing it already,
but... try rotating between 0 to 90 and then 270 to 360, instead of 0 to
90 and 90 to 180...
Hope it helps,
Filipe Abrantes
Vince wrote:
> Hi all,
>
> I'm using the demo API "3d Transition" to switch between a ListView
> and a WebView. The animation works... but my WebView is reversed, so
> is the content of the WebView, that makes it impossible to read. I
> understand the animation is rotating around the Y axis but I want it
> to display the WebView the right way. I think it has something to do
> with the following code:
>
> protected void applyTransformation(float interpolatedTime,
> Transformation t) {
> final float fromDegrees = mFromDegrees;
> float degrees = fromDegrees + ((mToDegrees - fromDegrees) *
> interpolatedTime);
>
> final float centerX = mCenterX;
> final float centerY = mCenterY;
> final Camera camera = mCamera;
>
> final Matrix matrix = t.getMatrix();
>
> camera.save();
> if (mReverse) {
> camera.translate(0.0f, 0.0f, mDepthZ * interpolatedTime);
> } else {
> camera.translate(0.0f, 0.0f, mDepthZ * (1.0f -
> interpolatedTime));
> }
> camera.rotateY(degrees);
> camera.getMatrix(matrix);
> camera.restore();
>
> matrix.preTranslate(-centerX, -centerY);
> matrix.postTranslate(centerX, centerY);
> }
>
>
> When I comment the camera.rotateY(degrees) statement, the WebView gets
> readable but the animation is not the same.
>
> Any idea?
>
> Thanks
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---