如此看来,这个问题需要详细信息,所以我要解释一下是什么问题。
当我启动我的应用程序时,我放了一个闪屏,然后我解析了我上次保存的本地JSON文件。然后我启动应用程序,该应用程序包含一个带有不同列表视图的选项卡活动,这些列表视图使用刚从JSON解析获得的数据。
与我启动应用程序的同时,我启动了一个查询Web服务的异步任务,并更新了我的本地JSON文件。然后我再次解析这些文件,我想通知所有已启动的列表视图,他们必须刷新其数据。我真的不知道该怎么做。
这里是我的异步任务的代码
class UpdateTask extends AsyncTask{
@Override
protected Object doInBackground(Object... params) {
// Gets all the JSON Files and save them in local
mJsonClient.loadDistantJSON();
// Updates the cache maps and lists
fillsMaps();
fillsLists();
return null;
}
protected void onPostExecute(Object downloadReturn) {
// Notify the listviews
;
}
}
在其他活动包含一个ListView,我访问缓存列表地方像一个静态的方式:
myAdapter = new MyBaseAdapter(this,
SplashScreen.list,listview);
我如果你愿意,我会很乐意提供更多的细节。
谢谢