O'Reilly logo

Mastering Android Game Development by Raul Portales

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

View animation

The original and simpler way of animating views in Android is to use view animation. This creates an Animation object either by loading it from XML or programmatically, which is then applied to the view. They are relatively easy to set up and offer enough capabilities to meet most needs.

There are some important details about view animations. They are as follows:

  • When we animate a view, all the children of the view are affected as well.
  • Regardless of how your animation may move or resize, the bounds of the view that is animated will not automatically adjust to accommodate it. Even so, the animation will still be drawn beyond the bounds of its view and will not be clipped. However, clipping will occur if the animation exceeds the bounds ...

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