我有一个AsyncTask跑步。我有一个TextView我模仿Toast最初产生的消息。我想清除TextView成功OnPostExecute但它没有这样做。任务完成Toast工作正常。如何将TextView中的设置OnPostExecute为空白?用户仍在显示屏幕上TextView。
错误情况的代码如下:
@Override
protected void onPostExecute(Void result)
{ FetchingImage=0;
if(webLoadError>0)
{
TextView text = (TextView) findViewById(R.id.textView2);
String temp=" ";
text.setText(temp);
Toast.makeText(getApplicationContext(), "Image not available from the internet.\nDefault or last image loaded.\nTry again later.",Toast.LENGTH_LONG).show();
}
}