iman453
iman453

Reputation: 9535

How can the size of a view change?

I was wondering what the purpose of the function onSizeChanged() is while building custom components. I was going over the tic tac toe sample, and can't really seem to get why it is needed, and how the size of a view can change. Sorry if this is a stupid question :)

Thanks

Upvotes: 2

Views: 570

Answers (1)

WarrenFaith
WarrenFaith

Reputation: 57672

The simpliest answer is the case, when you add text to a TextView. More text should increase the size of a TextView if the width/heigth is set to wrap_content.

Upvotes: 2

Related Questions