Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Android UI Development

You're reading from  Hands-On Android UI Development

Product type Book
Published in Nov 2017
Publisher Packt
ISBN-13 9781788475051
Pages 348 pages
Edition 1st Edition
Languages
Author (1):
Jason Morris Jason Morris
Profile icon Jason Morris

Table of Contents (21) Chapters

Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
Creating Android Layouts Designing Form Screens Taking Actions Composing User Interfaces Binding Data to Widgets Storing and Retrieving Data Creating Overview Screens Designing Material Layouts Navigating Effectively Making Overviews Even Better Polishing Your Design Customizing Widgets and Layouts Activity Lifecycle
Test Your Knowledge Answers

Creating animated views


Most widget animation can be taken care of using the animation APIs in Android. The standard animation APIs are designed to take care of animations with a defined start and end, or animations that form a simple loop. Some animations, however, don't fit into this mold; a good example would be a game. A game has many animations running continuously, and you can even think about the entire game screen as a single, continuous animation.

There are a number of widgets that need to be continuously animated, and your standard Android animation API won't work. In these cases, you'll need a View that can continuously animate and update itself as long as it's visible to the user. In these cases, a slightly different design is called for, as the widget will always be changing.

To illustrate how to write a widget that has a continuous animation, let's write a View class that animates some number of bouncing Drawable objects. Each Drawable will be tracked separately, and when it...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime}