2017-06-29 148 views

回答

0

How can I animate a view in Android and have it stay in the new position/size?

<set標籤內部,使用

android:fillAfter="true" 
android:fillEnabled="true" 

一般情況下,動畫不會改變視圖的實際特性,它只是蓬勃生機。如果您想更改實際屬性,請使用AnimationListener並監聽onAnimationEnd並自行進行更改。

+0

實際上,我想使用動畫器內的rotationY屬性來實現翻轉效果。但是如果視圖已經旋轉,它總是圍繞y軸。 – user7587662