onPostExecute method in Asynctask is not being called and the progressdialog is not getting dismissed. I'm not getting any exceptions as well. Any help would be appreciated.
Here is my code
public class ParseAsync extends AsyncTask<String, Void, Void>
{
ProgressDialog pDialog = null;
@Override
protected void onPreExecute()
{
super.onPreExecute();
pDialog = ProgressDialog.show(getActivity(), "", "Loading.....", true, false);
}
@Override
protected Void doInBackground(String... params)
{
RSSFeedXMLParser parser = new RSSFeedXMLParser();
String urls = params[0];
parser.parsedata(urls);
return null;
}
@Override
protected void onPostExecute(Void result)
{
pDialog.dismiss();
listAdapter = new ListAdapter(getActivity());
lvnewsfeed.setAdapter(listAdapter);
}
}
I'm calling the asynctask in oncreateview method like this:
new ParseAsync().execute("rssfeedurl");