This chapter is from the book
Workshop
Quiz
- What is the purpose of inJustDecodeBounds?
- How is onPreparedListener() used?
- What does mutable mean?
Answers
- In BitmapFactory.Options, you use inJustDecodeBounds to decode a Bitmap to get the dimension, but not actually create a Bitmap in memory.
- In a VideoView, onPreparedListener() listens for when a video is ready to play. The example in this hour showed a progress bar until the video was prepared and then displayed the video.
- Mutable means changeable, which is important when you create Bitmaps. Some methods return mutable Bitmaps and others return immutable Bitmaps.