[android-developers] Re: Neeeeeed HELP......How to get the text's length after TextView.setText()?

2008-12-03 Thread Mark Murphy
sweety wrote: I did something like this within my code: public void test(){ TextView tv = (TextView)findViewById(R.id.text_view); tv.setText(blablabla); int width = tv.getWidth(); int height = tv.getHeight(); } When test() is called(I am sure it's not called in the

[android-developers] Re: Neeeeeed HELP......How to get the text's length after TextView.setText()?

2008-12-03 Thread Dianne Hackborn
On Wed, Dec 3, 2008 at 9:31 AM, Mark Murphy [EMAIL PROTECTED] wrote: Most likely, your views are not yet laid out when you are calling test(). Either delay your call to test() until the views are laid out (e.g., onResume() might be late enough), or manually request a layout() of your root