Changing ui from thread

前端 未结 2 582
孤独总比滥情好
孤独总比滥情好 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:02

    You can use this activity method:

    YourActivity.this.runOnUiThread(new Runnable() {
      @Override
      public void run(){ 
          //Your awesome code here
    
      }
    });
    

提交回复
热议问题