Android Media and Animation 6

กดปุ่ม หมุนจรวดตามองศาที่กำหนด และจรวดพุ่งตรงออกไป

แก้ไขเฉพาะ .xml ไฟล์ MainAcitivity.่java ไม่ต้องแก้ไข

rocket_move.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromYDelta="0%p" พุ่งตรงไป 0% - -50%
android:toYDelta="-50%p"
android:duration="4000"
android:startOffset="3000"

/>
<rotate android:fromDegrees="0"
android:toDegrees="45" องศาที่ให้จรวดหมุนจาก degree 0-45
android:duration="3000" ในระยะเวลา 3000
android:pivotX="50%"
android:pivotY="50%"
/>
</set>

Picture 2014-03-08 15_09_53 Picture 2014-03-08 15_10_13