Pretty Little Things

Pretty Little Things

It's important that an app performs its functions well, but it's also important that users like it and want to use it. Learn how to spruce up the visual aspects of the Crystal Ball app by using images, animations, View customizations, and sounds.

Extra Credit

Fancy Animation

See if you can create some of the animations Mike used in his Crazy Crystal Ball app from the "Animating the Crystal Ball" video. Try out TranslateAnimation and ScaleAnimation on an image you add to the layout as an ImageView.

Both of these types of animation use the same Animation base class and methods.

Sample code:

Animation translateAnim = new TranslateAnimation(0, 320, 0, 0);
// Set as 1 second
translateAnim.setDuration(1000); 
// Repeat indefinitely
translateAnim.setRepeatCount(Animation.INFINITE); 
// Reverse animation each time
translateAnim.setRepeatMode(Animation.REVERSE); 
newImageView.startAnimation(translationAnim);

TranslateAnimation ScaleAnimation