8. SpotOn Game App: Property Animation, ViewPropertyAnimator, AnimatorListener, Thread-Safe Collections, Default SharedPreferences for an Activity

Image

Objectives

In this chapter you’ll:

• Create a simple game app that’s easy to code and fun to play.

• Use ViewPropertyAnimators to group animations that move and resize ImageViews.

• Respond to animation lifecycle events with an AnimatorListener.

• Process click events for ImageViews and touch events for the screen.

• Use the thread-safe ConcurrentLinkedQueue collection from the java.util.concurrent package to allow concurrent access to a collection from multiple threads.

Outline

8.1 Introduction

8.2 ...

Get Android™ for Programmers: An App-Driven Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.