Re: [android-developers] Getting the height of a TextView

2010-09-19 Thread wang xin
Before a view can draw on the canvas, the width & height will be 0, you can get them in the onDraw() of the view. On Sun, Sep 19, 2010 at 11:46 AM, Bret Foreman wrote: > I have a TextView where I have called setText() and setWidth(). This > causes the text to wrap and the view to grow longer wit

[android-developers] Getting the height of a TextView

2010-09-18 Thread Bret Foreman
I have a TextView where I have called setText() and setWidth(). This causes the text to wrap and the view to grow longer with more text, which is what I want. But I have some other graphics that I want to position relative to the resulting height of the TextView. I tried calling getHeight() (after