Skip to Main Content
50 Android Hacks
book

50 Android Hacks

by Carlos Sessa
June 2013
Intermediate to advanced content levelIntermediate to advanced
216 pages
6h 3m
English
Manning Publications
Content preview from 50 Android Hacks

Chapter 2. Creating cool animations

In this chapter, you’ll learn about animations. You’ll find different examples that use a variety of APIs to add animations to your application widgets.

Hack 5 Snappy transitions with TextSwitcher and ImageSwitcher: Android v1.6+

Imagine you need to cycle through information in a TextView or in an ImageView. Some examples of this would be

  • Navigating through a list of dates with Left and Right buttons
  • Changing numbers in a date picker
  • Countdown clock
  • News headlines

Changing the contents of a view is a basic function of most applications, but it doesn’t have to be boring. If we use the default TextView, you’ll notice there’s no eye candy when we swap its content. It’d be nice to have a way to apply ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Android Security

Android Security

Anmol Misra, Abhishek Dubey

Publisher Resources

ISBN: 9781617290565Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link