Android: Only the original thread that created a view hierarchy can touch its views - UnitTest

前端 未结 4 1052
别跟我提以往
别跟我提以往 2021-01-13 02:03

I\'m designing UnitTest for little app. This app cout what numerology number You are using birth date. I have a problem, I what to invoke method which check number and put v

4条回答
  •  春和景丽
    2021-01-13 02:41

    put the code where you set value to textview in a new thread;

      Handler h=new Handler();
      h.post(new Runnable() {
            public void run() {
    
            textView.setText(value);
            }
       });
    

    Looks lile your textview is finInformation use that in run();

提交回复
热议问题