I\'m trying to show a progress dialog while the twitter feed is loading up...However the progress dialog remains on screen when the twitter feed appears. Any help is much ap
You must use a onPreExecute and onPostExecute of AsyncTask class. For example:
class AsyncData extends AsyncTask{
@Override
protected void onPreExecute() {
super.onPreExecute();
// init progressdialog
}
@Override
protected Void doInBackground(Void... arg0) {
// get data
return null;
}
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
// dismiss dialog
}
}