views:

64

answers:

1

Hello there :)

I want to do some data processing (in a thread) right after my main Activity starts. For that data processing to be started I also need to know a visible size of my main View (which is a LinearLayout currently, but whatever).

I wonder how to do that. I.e. I wonder what is the entry point (callback?) I should use to be sure that my main View has been layed out, so i can use view.getWidth/getHeight?

Is creating a custom View and reimplementing it's onSizeChanged() - the only way? In this case how should I properly describe it in my xml layout file? (it will contain some child views)

Thanks in advance.

A: 

You can handle it in Activity#onWindowFocusChanged

Jacques René Mesrine
Looks like it might be the solution. Thank you, i'll try.
dpimka
Yep, worked perfectly. Thanks.
dpimka