我檢出了API代碼附帶的過渡動畫,並且發現活動1下沉的動畫zoom_enter和zoom_exit顯示活動2.我需要其他方式。我需要活動2從內部縮小和頂部。 (我希望你能得到我)。這種類型的動畫在iphone屏幕轉換上是一樣的。縮小兩個活動之間的過渡動畫
下面的代碼是我所具有的效果,我不需要。 這裏是zoom_enter.xml
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator">
<scale android:fromXScale="2.0" android:toXScale="1.0"
android:fromYScale="2.0" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
android:duration="@android:integer/config_mediumAnimTime" />
</set>
的代碼,這裏是zoom_exit.xml代碼
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:zAdjustment="top">
<scale android:fromXScale="1.0" android:toXScale=".5"
android:fromYScale="1.0" android:toYScale=".5"
android:pivotX="50%p" android:pivotY="50%p"
android:duration="@android:integer/config_mediumAnimTime" />
<alpha android:fromAlpha="1.0" android:toAlpha="0"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
然後之後startActivity我叫下面的方法:
overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
燦任何人都可以提出如何對上述文件進行更改以解釋屏幕過渡?
您是否嘗試顛倒R.anim.zoom_enter並退出?什麼是錯的,你想要改進什麼? –
當我反轉參數它仍然是一樣的。我得到了和以前一樣的效果,但有一些小故障。這就是我的意思。看看當一個圖標被點擊的時候,第二個活動彈出來.http://www.youtube.com/watch?feature = endscreen&NR = 1&v = eHm9MwjiwQA – Hussein
@jasper,只需在該參數中加0即可。 –