problem with a text view

前端 未结 2 607
长发绾君心
长发绾君心 2021-01-27 12:50

I\'m reading some data like speed and curent location using a single ton class....I\'m reading them using an AsyncTask thread in a loop....:)....each time I\'m reading a new spe

2条回答
  •  清酒与你
    2021-01-27 13:47

    You should always post UI updates on the UIThread.

    runOnUiThread(new Runnable() {
            public void run() {
                 speed_1.setText(Integer.toString(speed));
                 location.setText(loc1);
    
            }
    }
    

提交回复
热议问题