AsyncTask耗時工作
使用方法
class TestTask extends AsyncTask<Void, Void, Void>
{
TestTask(Context context, JSONObject result)
{
//也可以這樣傳入參數
...
}
@Override
protexted Boolean doInBackground(Void... params)
{
//do something
return null;
}
}TestTask testTask = new TestTask();
testTask.execute();與UI Thread的互動
Last updated