Book Image

Android 3.0 Animations: Beginner's Guide

By : Alex Shaw
Book Image

Android 3.0 Animations: Beginner's Guide

By: Alex Shaw

Overview of this book

<p>An enjoyable, understandable, and eye-catching user interface is a key part of getting users to love your app. Users today expect a polished multimedia experience on their mobile device, and animation is a core part of that. The Android operating system is at the forefront of tablet and smartphone technology, and there is a plethora of opportunities for developing exciting applications with animation.</p> <p>Android 3.0 Animations Beginner’s Guide will introduce each of the most popular animation techniques to you. Using step-by-step instructions, you will learn how to create interactive dynamic forms, moving graphics, and 3D motion.</p> <p>You will be taken on a journey from simple stop motion animations and fades, through to moving input forms, then on to 3D motion and game graphics.</p> <p>In this book, you will create standalone animated graphics, three-dimensional lifts, fades, and spins. You will become adept at moving and transforming form data to bring boring old input forms and displays to life. Learn how game programmers create fast animations on the fly, and also build live wallpapers to liven up your users’ home-screens!</p> <p>If you are tired of writing lifeless interfaces and want to add some animated excitement, this is the book for you!</p>
Table of Contents (16 chapters)
Android 3.0 Animations
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Time for action - making a tower of Hanoi puzzle


The Towers of Hanoi is a classic logical puzzle that you have almost certainly played, maybe even written a computer program to solve it. It involves stacking several pieces in height order onto one of three pegs.

In this chapter, we are going to create that game in a simple sort of way. Don't worry if you have never played it before; I'll explain before each tutorial what we are going to make next.

Here we see a side-view of a tower being built. The peg is shown in brown, the red block is resting on the peg, and the green block is being added to the peg. The height of the tower is the number of blocks on its peg.

In this tutorial, we will make a peg graphic onto which we can put building blocks. The blocks will arrive on the peg (actually, just a LinearLayout) using a tween animation. This is the way a tower is formed in the game.

  1. 1. Create a new Android project with the following settings:

    • Project name: Towers of Hanoi

    • Build Target: Android...