开发者

Dynamically display a TextView

开发者 https://www.devze.com 2023-02-09 09:40 出处:网络
Is it possible to display a TextView dynamically so that the height of the text can be retrieved in the middle of the Application but not at the end that is done using onG开发者_JAVA技巧lobalLayout()

Is it possible to display a TextView dynamically so that the height of the text can be retrieved in the middle of the Application but not at the end that is done using onG开发者_JAVA技巧lobalLayout() or onSizeChanged().

My requirement is to display the text in the TextView to a certain height limit. I need to check the height of the text in the TextView so that I can achieve my requirement but using any of the onGlobalLayout() or onSizeChanged(), I am getting the height at the end which is of no use to me because I can't check at the end.

Is there anyway to achieve my requirement?


I think this will help you.

Dynamic Views in Layout

0

精彩评论

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