我想在进度条文本(变量)中显示处理数据,该文本在 AsyncTask class 的 doingBackground() 方法中发生变化

i want to show the processing data in progressbar text(variable) which is changing in doingBackground() method of an AsyncTask class

This image shows a fixed Text only

protected String doInBackground(String... params) {
        // TODO Auto-generated method stub
        // SaveAndCheck sac=new SaveAndCheck(getApplicationContext());
        System.out.println("comes");
        ar.clear();
        getContacts(check_string); 



        return null;
    }

通过getContacts(check_string)方法获取联系人姓名; .想在进度条中显示名称

您可以在 doInBackGround() 方法中添加 runOnUiThread

runOnUiThread(new Runnable() {
           @Override
           public void run() {
              txtView.setText("VARIABLE");       
           }
        });

或者您可以使用 onProgressUpdate()