Changing ui from thread

前端 未结 2 471
孤独总比滥情好
孤独总比滥情好 2021-01-26 04:51

I know there were similiar question, but my problem slightly different i have such code

 Thread t = new Thread(){
        public void run(){
            while(!r         


        
2条回答
  •  无人及你
    2021-01-26 05:20

    well in the change now you can do

    new Handler(Looper.getMainLooper()).post(new Runnable() {
    
        @Override
        public void run() {
        // your ui code here
    
        }
    });
    

提交回复
热议问题