O'Reilly logo

Android 3.0 Animations by Alex Shaw

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action—make the transition

This time, we are going to make an activity that reveals a hidden scene when you touch it. The scene is going to be made from two images. The first image will be a lights off image, where you can only see a vague shape, as if it was very dark. The second image will be the scene itself, with a light bulb in the scene. We will use a transition animation to give the impression that the light is lit slowly, by fading between the first and second images.

  1. Create a new Android project with the following settings:
    • Project name:NightLight
    • Build Target:Android 3.0
    • Application name:NightLight
    • Package name:com.packt.animation.nightlight
    • Create Activity:NightLightActivity
  2. Firstly we need to import the graphics lightoff.png and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required