2010-12-14 34 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); 
     } 

我註釋掉舊的實現。

相關問題