2010-12-14 25 views
3

我是android开发的新手,目前我正在通过ApiDemos项目中的文件Rotate3dAnimation来研究3D动画。这个类以相反的顺序显示图像,我试图显示这个控件以实际的顺序显示图像,但是我的运气不好继续下去。你能请教我哪一行以相反的顺序显示图像?Android ApiDemos - Rotate3dAnimation

感谢, 山

回答

3

答案很简单,你改变applyed旋转来:

applyRotation(-1,0,90);并应用旋转(1,0,90);

这是当你第一次调用它,当你把它叫做下半年您使用以下:

 if (mPosition > -1) { 
      mStartView.setVisibility(View.GONE); 
      mEndView.setVisibility(View.VISIBLE); 
      mEndView.requestFocus(); 

      //rotation = new Rotate3dAnimation(90, 180, centerX, centerY, 310.0f, false); 
      rotation = new Rotate3dAnimation(-90, 0, centerX, centerY, 310.0f, false); 
     } else { 
      mEndView.setVisibility(View.GONE); 
      mStartView.setVisibility(View.VISIBLE); 
      mStartView.requestFocus(); 

      rotation = new Rotate3dAnimation(-90, 0, centerX, centerY, 310.0f, false); 
      //rotation = new Rotate3dAnimation(90, 0, centerX, centerY, 310.0f, false); 
     } 

我注释掉旧的实现。

相关问题