内部に更新コードを含む onResume() メソッドを実装すると、エラーが発生します
これは私のコードです
// After completing background task Dismiss the progress dialog
protected void onPostExecute(String file_url) {
// dismiss the dialog after getting all events
pDialog.dismiss();
// updating UI from Background Thread
runOnUiThread(new Runnable() {
public void run() {
// Updating parsed JSON data into ListView
adapter = new SimpleAdapter(BookmarkActivity.this,
eventsList, R.layout.bookmark_list, new String[] {
TAG_EID, TAG_ENAME, TAG_CNAME,
TAG_CREATED_AT }, new int[] { R.id.bk_eid,
R.id.bk_ename, R.id.bk_cname,
R.id.bk_created_at });
// updating listView
setListAdapter(adapter);
}
});
}
public void onResume(){
super.onResume();
((BaseAdapter) adapter).notifyDataSetChanged();
}
これは私のlogcatエラーです
09-05 07:39:36.223: E/AndroidRuntime(626): Caused by: java.lang.NullPointerException
09-05 07:39:36.223: E/AndroidRuntime(626): at com.stts.sparetimetradingsystem.BookmarkActivity.onResume(BookmarkActivity.java:215)
09-05 07:39:36.223: E/AndroidRuntime(626): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
09-05 07:39:36.223: E/AndroidRuntime(626): at android.app.Activity.performResume(Activity.java:3823)
09-05 07:39:36.223: E/AndroidRuntime(626): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3118)
09-05 07:39:36.223: E/AndroidRuntime(626): ... 12 more
この問題を解決するにはどうすればよいですか?