O'Reilly logo

Android User Interface Development by Jason Morris

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

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