0
我使用帶適配器ASY任務,並得到這個錯誤NullPointerException異常上的AsyncTask帶適配器
java.lang.NullPointerException
問題行是
listAdapter = new listAdpterRss(this.context, R.layout.listitems,RssArrays,RssArrays.rtl);
我ASY任務看起來像
protected void onPostExecute(String result) {
Dialog.dismiss();
ListView lv = getListView();
// lv.setTextFilterEnabled(true);
listAdapter = new listAdpterRss(this.context, R.layout.listitems,RssArrays,RssArrays.rtl);
lv.setAdapter(listAdapter); // on test
listAdapter.notifyDataSetChanged();
lv.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Intent intent = new Intent(RssItem.this,openRssItem.WebActivity.class);
intent.putExtra("url", RssArrays.PodcastURL[position].toString());
startActivity(intent);
//new splash(ListRss.this,mHandler,listValue.get(position).toString()).execute();
}
});
Stacktrace請...... – Adil
和listAdapterRss – Adil
調試異常是在我得到listAdapterRss的承包商之前 –