我正在使用AsyncTask
来计算双精度值,然后我想发布这个双精度值
private class CalcTask extends AsyncTask<Void, Double, Void>{
@Override
protected Void doInBackground(Void... parms){
//Completes calculations and places them in a double
double calc = 54.245555 //arbitrary number for this example
publishProgress(calc);
return null;
}
protected void onProgressUpdate(Double... calc){
textview.setText("Value: " + calc);
}
}
目前的输出是:
值:[L]java.lang.Double;@4054d180
有没有办法只发布双精度值而不是十六进制地址?