我想更新我的文本視圖,當循環處於doinbackground() {}
運行。我想更新與在後臺如何使用Android中的async.process更新textview文本?
protectedBooleandoInBackground(String...args)
{
startManagingCursor(cursor);
if (cursor.moveToFirst())
{
do {
publishProgress();
}
while(cursor.moveToNext());
}
else {
}
try
{
if (writer!=null)
writer.close();
}
catch(IOExceptione)
{
Log.w("Test",e.toString());
}
end loop
return null;
}
protected void onProgressUpdate(String...values)
{
Log.i("test..","ramjit");
}
我不能進入我的onProgressUpdate()
方法運行循環的計數器我的文本視圖。因此,如何在環路上doinbackground();
那麼你能澄清一下代碼在幹什麼,不幹什麼,如果你看到任何錯誤? – huntsfromshadow
實際上無法運行onProgressUpdate(String ... values)方法... –
以及如何設置文本以使其更新? –