onMeasure, onLayout, onDraw: Briefly speaking

satya - 6/3/2013 3:22:08 PM

onMeasure(): calculate and set your size

A view is expected to measure its size. Not aware of its position where it is in the layout hierarchy. Merely a method for its size!!

satya - 6/3/2013 3:22:59 PM

onLayout(): The position for this control

a view is called with its old and new positions! The view can further layout its children once it knows where itself is!!

satya - 6/3/2013 3:23:24 PM

onDraw(): of course use the size and position on the canvas to draw!!

onDraw(): of course use the size and position on the canvas to draw!!