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 ...

Get Android Game Programming: A Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.