Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android call back after layout rendering has completed?

How can i create/bind a service only after activity layout is rendered?

-- Update

I have two tabs (both as separate activities)on the main activity and the data used for tabs comes from Service. Right now i'm binding service inside onCreate method. Issue is that layout is not rendered till all the statements inside the onCreate gets finished. A blank screen is shown till the service get bind

like image 903
Mithun Sreedharan Avatar asked Apr 11 '11 14:04

Mithun Sreedharan


1 Answers

See ViewTreeObserver

More info here: https://stackoverflow.com/a/7735122/338479

like image 179
Edward Falk Avatar answered Sep 27 '22 21:09

Edward Falk