private class performBackgroundTask extends AsyncTask < Void, Void, Void >
{
private ProgressDialog pdia;
@Override
protected void onPreExecute(){
super.onPreExecute();
pdia = new ProgressDialog(FriendList.this);
pdia.setMessage("Loading...");
pdia.show();
}
@Override
protected Void doInBackground(Void... params) {
// TODO Auto-generated method stub
asybcTastRun = new AsyncFacebookRunner(LoginActivity.facebook);
asybcTastRun.request("me/friends", new FriendCallback());
return null;
}
protected void onPostExecute(String result){
// super.onPostExecute(result);
pdia.dismiss();
}
}
{
private ProgressDialog pdia;
@Override
protected void onPreExecute(){
super.onPreExecute();
pdia = new ProgressDialog(FriendList.this);
pdia.setMessage("Loading...");
pdia.show();
}
@Override
protected Void doInBackground(Void... params) {
// TODO Auto-generated method stub
asybcTastRun = new AsyncFacebookRunner(LoginActivity.facebook);
asybcTastRun.request("me/friends", new FriendCallback());
return null;
}
protected void onPostExecute(String result){
// super.onPostExecute(result);
pdia.dismiss();
}
}
Very useful example.Thanks
ReplyDeletehere is another useful example that lets you use ProgressDialog using threads and handlers also . http://blog.creatiosoft.com/?p=1316
Thanks meera..:)
Deletevk
Simple but effective example, But in this way, the progress dialog spinner is not animating. why?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteVery informative ..i suggest this blog to my friends..Thank you for sharing
ReplyDeleteBest Android Training in Velachery | android development course fees in chennai