yugandhar babu
yugandhar babu

Reputation: 277

How a view is created in android?

I want to know how a View is created in Android. On a View object creation which functions are called?Initially constructors will be called.Next what? And so on. If anybody know the sequence of functions called after object creation,Please reply me.

Thanks

Upvotes: 0

Views: 864

Answers (2)

Shailendra Singh Rajawat
Shailendra Singh Rajawat

Reputation: 8242

1) Constructor : to initialize variables

2) onMeansure : to prepare canvas , set Width and height

3)OnDraw() : to draw actual view .

now onDraw() will continuously be called after a particular interval which depends upon display/processor and UI eventsenter code here or on calling invalidate()

Upvotes: 1

Vivek Kalkur
Vivek Kalkur

Reputation: 2186

This might help you better I guess.

Upvotes: 1

Related Questions