Time for action - animating a GridView

The GridView class has its own LayoutAnimationController specifically designed to animate it in terms of rows and columns, allowing more complex effects than can be achieved with a standard LayoutAnimationController. For this next part of the "animations" example we're going to build a lovely color selector out of a GridView. When the selector first appears on the screen, each color swatch will fade in, starting in the top left corner and ending on the bottom right corner.

  1. Start by declaring a new Java source file in the root package of your project named ColorAdapter.java, which will generate the color swatches for the GridView.
  2. The ColorAdapter needs to extend BaseAdapter to take care of the boiler plate ...

Get Android User Interface Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.