2015-07-21 141 views
1

您好我很新的android應用程序。現在我創建一個移動商務android應用程序。我想創建一個啓動畫面與動畫,它就像禮品盒將從頂部到與旋轉活動的底部functionality.please幫我啓動畫面的Android圖像動畫

先感謝

+1

我們都是新來的Android在某些時候。開始閱讀http://developer.android.com/intl/ru/training/animation/index.html,稍後再提供一個更具體的問題;)向我們展示您在實現動畫時遇到的問題。 – Gordak

回答

6

創建名爲/ rotate_move_down.xml內部資源動畫資源文件阿尼姆目錄

<set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true"> 
    <!-- Rotate --> 
    <rotate 
     android:duration="1200" 
     android:fromDegrees="0" 
     android:interpolator="@android:anim/linear_interpolator" 
     android:pivotX="50%" 
     android:pivotY="50%" 
     android:toDegrees="360" /> 

    <!-- down move --> 
    <translate 
     android:duration="1500" 
     android:fromYDelta="0%p" 
     android:interpolator="@android:anim/linear_interpolator" 
     android:toYDelta="80%p" /> 
</set> 

,並使用此動畫飛濺活動喜歡這個。

Animation animation= AnimationUtils.loadAnimation(MainActivity.this,R.anim.rotate_move_down); 
imageView.startAnimation(animation); 

imageView in your xml file。

+0

這對我有效,歡呼。 – Booger

+0

謝謝rajesh ...它的工作... :-) –