Multi-threaded Rocket Animation

Source code in Rocket.zip

The circular animal rolls from left to right along the floor of the big, white RocketView. When the blue button becomes enabled, press it to launch a rocket from the right edge of the screen that will fly to the left until it hits and immobilizes the animal.

The screenshot was taken when the android:layout_height of the button was wrap_content.

  1. MainActivity.java
  2. RocketView.java. The constructor with two arguments is called when activity_main.xml is inflated.
  3. activity_main.xml
  4. AndroidManifest.xml
  5. build.gradle. Converted to API 21 so we could run the project on the Android Studio in the classroom.