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—adding a Description Pane

As mentioned earlier, the classical orrery was a great educational piece in the natural sciences. As we are clever people, we shall add a Fragment to our orrery that provides some educational information about the solar system and we will make it fade in gracefully.

  1. Firstly, let us create our animation Fragment. Add a new Java file to the project called OrreryInfo.java. In it, add the following code:
    package com.packt.animation.orrery; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.AlphaAnimation; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; ...

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