A (175)

(Tuis.) #1
CHAPTER 2: Configuring Your Android App Development System 57

We will look at the class foundation for graphics in Android by learning about the Drawable class
and its many subclasses such as BitmapDrawable and ShapeDrawable. You will also learn about
foundational concepts in the area of graphics design and image compositing.


You’ll learn how to create graphics assets, as well as how to create several different versions
of those image assets that will scale well across different screen densities. You will learn about
Android’s scalable graphic classes, such as the NinePatchDrawable class, and learn about the
9-Patch tool that comes with the Android SDK. This is a chapter that will transform how your
Android applications look, and the knowledge gained in this chapter will allow you to greatly increase
an app’s professionalism.


Animation: Adding Motion Graphics to Your Apps


In Chapter 10, we will build on those static (still) graphic capabilities we learned about during
Chapter 9 by adding the fourth dimension of time, as motion, to these graphic assets, to create
animation assets.


We will take a look at the Android Animation class, which you can use to create procedural, also
known as vector or tween, animation, as well as the AnimationDrawable class, which is used to
create frame animation (also known as bitmap animation or raster animation).


You will learn what the differences between procedural vector animation and bitmap frame
animation are, and how to utilize the two completely different animation approaches together, in
hybrid animation, to create a more impressive visual result than would be achieved by using them
separately.


You’ll implement animation assets using XML, so you will get even more practice designing and
implementing new media assets using XML markup.


Digital Video: Captive or Streaming Video for an Application


In Chapter 11, we will look at the digital video type of new media asset, which is very different from
the animation new media asset, because it is self-contained and uses a single file format. We will
take a look at the concepts of URLs and URIs, which are used to define a path, or address, to your
digital video asset.


We will also take a look at the Android VideoView widget class, which is a user interface element
specifically designed and provided by Android for playing digital video formats. We will look at how
this class works hand in hand with the Android MediaPlayer and Android MediaController classes.


We will take a look at the foundational concepts involved with digital video, and how they expand on
what we learned about digital images, since digital video is simply a series of digital images. We will
also take a close look at popular digital video formats, which are implemented as something called
digital video codecs, currently supported in Android.


We will look at the two primary digital video formats that are supported in Android, MPEG-4 and
WebM, how they differ from each other, their strengths and weaknesses, which are the preferred
ones to use for your Android applications development, and which digital video formats you should
use for various types of captive versus streaming implementations. You will create a digital video
asset using Terragen, VideoDub, and Squeeze Pro and implement it in an Android application using
Java code and XML markup.

Free download pdf