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
Post a Comment