java - Wrong Time Unit -


i need may load @ first bacground (setcontentview(r.layout.activity_logo); ) after (6 second) text in textview4. program make wrong. after start application, app wait 6 second , next build setcontentview(r.layout.activity_logo); , write textview4

why? thanks

protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_logo);      try {         timeunit.seconds.sleep(6);         textview textview4 = (textview) findviewbyid(r.id.textview4);         textview4.settext("alalaalalalalalal");      } catch (interruptedexception e) {         e.printstacktrace();     } } 

protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_logo);             handler mhandler = new handler();         mhandler.postdelayed(new runnable() {              @override             public void run() {                    textview textview4 = (textview) findviewbyid(r.id.textview4);         textview4.settext("alalaalalalalalal");             }         }, 6000); } 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -