How to use Thread.sleep() in this example in android -
i have example code on main thread:
userbutton.setonclicklistener(new view.onclicklistener()     {         public void onclick(view v)         {             simplemessage.settext("msg1");              try {                 thread.sleep(1000);             } catch (interruptedexception e) {                 e.printstacktrace();             }              simplemessage.settext("msg2");              try {                 thread.sleep(1000);             } catch (interruptedexception e) {                 e.printstacktrace();             }              simplemessage.settext("msg3");         }     });   the problem updates text "msg3" after amount of time. why happening , how make update @ every message?
 
 
Comments
Post a Comment