multithreading - Android Thread makes the UI blank screen -


i have written thread in application. when thread starts running, ui screen becomes blank. how can avoid this?

public class settickertext extends thread {     @override     public void run()     {         while(true)         {             systemclock.sleep(25000);             log.i("map", "after wait");         }     } 

it's going (don't have compiler near me):

new settickertext().start() 

essentially, when tell thread object start, spins new thread, invokes run you. you're doing calling run ui thread, other function, it's blocking ui thread returning


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -