Possible Duplicate:
Best practices: Layouts on Android (Programmatic vs XML)
Which of way of creating complex view in android is faster
1) defining the layout in xml by adding standard view in layout.
2) Draw the required in the onDraw of an custom view