开发者

How can the size of a view change?

开发者 https://www.devze.com 2023-01-21 04:49 出处:网络
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 t

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 qu开发者_开发百科estion :)

Thanks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号