android - why views do not appear when we use thread -


protected void oncreate(bundle savedinstancestate) {     // todo auto-generated method stub     super.oncreate(savedinstancestate);     this.requestwindowfeature(window.feature_no_title);     setcontentview(r.layout.activity_welcome);      new thread(new btthread()).start(); } 

in btthread, there public void run() method thread.sleep(3000)first , jump activity. during first activity time, cannot see content of activity_welcome. if ideas this, appreciate have help.

you can't start new activity on thread other main thread.

if btthread inner class of activity can call

runonuithread(new runnable() {     public void run() {         //startactivity     } }); 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -