I already tried references from similar question on SO, but hasn\'t got the appropriate solution.
I\'m trying to fetch the data from a webpage and displ
You are creating the listViewAdapter
in the onCreate of MultiCol
and passing in a reference to list
. However, at that point list
has not been instantiated yet, since that does not happen until your AsyncTask finishes. In other words: you're passing in null
, hence the nullpointer exception in LogCat.
To correct this, you'll probably want to move the following two lines of code to the end of the onPostExecute() of your DownloadWebPageTask:
listviewAdapter adapter = new listviewAdapter(this, list);
lview.setAdapter(adapter);
That way you will supply the adapter with an instantiated (non-null) list object.