5.1 Fill in the blanks in each of the following statements:
a) To access the app’s assets
folder’s contents, a method should get the app’s AssetManager
by calling method ______ (inherited indirectly from class ContextWrapper
).
b) Files in the assets
folders are accessed via a(n) ______ (package android.content.res
), which can provide a list of all of the file names in a specified subfolder of assets
and can be used to access each asset.
c) A(n) ______ animation moves a View
within its parent.
d) By default, animations in an animation set
are applied in parallel, but you can use the ______ attribute to specify the number of milliseconds into the future at which an animation should begin. This can be used to sequence the animations in a set
.
5.2 State whether each of the following is true or false. If false, explain why.
a) We use AnimationUtils static
method loadAnimation
to load an animation from an XML file that specifies the animation’s options.
b) Android does not provide a logging mechanism for debugging purposes.
c) ImageView
’s Adjust View Bounds property specifies whether or not the ImageView
maintains the aspect ratio of its Drawable
.
d) You load color and String
array resources from the colors.xml
and strings.xml
files into memory by using the Activity
’s Resources
object.
e) Use activities to create reusable components and make better use of the screen real estate in a tablet app.