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 <[email protected]>wrote: > 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 setting text and width) and that method > returned 0. So how can I find the height of the TextView? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- To Be Greate... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

