Event Handling and Threading
The basic cycle of a view is as follows:
An event comes in and is dispatched to the appropriate view. The view handles the event and notifies any listeners.
If in the course of processing the event, the view's bounds may need to be changed, the view will call requestLayout().
Similarly, if in the course of processing the event the view's appearance may need to be changed, the view will call invalidate().
If either requestLayout() or invalidate() were called, the framework will take care of measuring, laying out, and drawing the tree as appropriate.
Partager