我正在使用带有适配器的 asy 任务并收到此错误
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();
}
});