Sometimes, the existing widgets just aren't enough, no matter how much you customize them. Sometimes, you need to display something that simply isn't supported by the platform. In these cases, you might find yourself needing to implement your own custom widget. The View class can be easily extended to produce many different effects, but there are a few things that are worth knowing before you tackle it:
- The rendering for a View is expected to happen in the onDraw method.
- When rendering the graphics for the View, you'll use a Canvas to send the drawing instructions.
- Each View is responsible for calculating the offsets for its padding, and by default, the graphics will be clipped to these dimensions.