wait till layout is shown

by guruk » Wed, 03 Jun 2009 20:00:31 GMT


Sponsored Links
 Hi, i have a main activity that needs quit a lot to load
so i thought about a trick:

i call a intropage that shows a pic and from directly it calls by
intent the
long loading page.

Finaly I thought I would see the pic and in the background the other
intent
is loading, when its done the intro page dissapear automaticly and
voila.

(yes i thought i am very clever.... )

But now i see, that the Intro Page does not come initialized at all.
I see in the header that the intro page is active, but the pic is not
shown.
immediatly it loads the main intent.

So i guess i have to options.. make a small wait (but how) that the
pic from
the intro is finaly shown.. or more professional I have the option to
request
from windowmanager or so, if the layout from the intro is full shown.
Only when that is done, I would call the Intent to start the main
activity.

Any Ideas?

Thanks
Chris

--~--~---------~--~----~------------~-------~--~----~



wait till layout is shown

by guruk » Wed, 03 Jun 2009 20:19:15 GMT


 i even tried to place my startactivity for the main activity
in

onSTART

but still my intro pics on the intro page are not shown.
immediatly it starts the mainactivity...


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


wait till layout is shown

by Marco Nelissen » Wed, 03 Jun 2009 23:39:28 GMT


 




The problem is that you're blocking the main thread, which prevents the UI
from being shown.
You don't really need your 'intro' activity. In your main activity, you can
just set a picture, then do whatever your activity needs to do at startup in
another thread, and once that is done, update the UI.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Android developer site not Android friendly...

Why don't you (lbcoder) open for example "Application Fundamentals"
from "Dev Guides" and try scrolling past "Application Components"?






--~--~---------~--~----~------------~-------~--~----~

2. so we can access the paid app market now?

http://tech.slashdot.org/article.pl?sid=09/03/11/0227222

anyone had any lucj with this?

--~--~---------~--~----~------------~-------~--~----~

3. 3D Rendering Library

4. Intercepting web browser clicks

5. Conditionally process AndroidManifest.xml?

6. I can't use my Google account to post question at Android Developers

7. gears database in G1 or emulator