java - Failed using ProgressDialog in extends Fragment -


can tell me wrong code ? want call progressdialog during loading subject details.

here part of whole code.

public class schedulefragment extends fragment { /*    others activity    */  public progressdialog pdialog;  // loading subject in background thread     new loadallsubject(getactivity()).execute();   class loadallsubject extends asynctask<string, string, string> {       @override     protected void onpreexecute() {         super.onpreexecute();         pdialog = progressdialog.show(schedulefragment.this, "progress", "loading subjects. please wait...");         pdialog.setindeterminate(false);         pdialog.setcancelable(false);     }  } 

you need call background thread inside "oncreateview"


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -