目前我有工作原理是這樣的的AsyncTask:
String doInBackground(Void... params)
//Downloads a JSON and returns it to the onPostExecute().
void onPostExecute(String response)
//Parses the JSON which has an array of stuff and insert into sqlite.
Call changeCursosr and notifyDataSetChanged.
這是處理插入和清爽的列表視圖的正確方法嗎?目前,我在遇到執行後遇到輕微的掛起。我應該解析&在doInBackground中插入數據嗎?
應該在onPostExecute中獲取數據和更改光標嗎? – Maurice 2011-12-21 03:02:54
不,取數據應該在'doInBackground'中出現。 – 2011-12-21 20:42:23