Chapter 12 - Customizing Widgets and Layouts
- When rendering specialized graphics for a custom widget, you need to do which of these?
- Override the
onDraw
method
- Override the
- Where should you create instances of graphics primitives such as
Drawable
,Paint
, andPath
for rendering inonDraw
?- Anywhere that doesn't affect
onDraw
directly
- Anywhere that doesn't affect
- What are the two phases involved in the layout process?
- Measurement and then layout
- When painting a
Drawable
object, you need to do which of the following?- Pass it a valid
Canvas
object
- Pass it a valid
- To tell the platform that a widget needs to repaint itself (from the main thread), you use which of these?
View.invalidate()