Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyAsyncTaskClass extends AsyncTask {
- private ProgressDialog referenceToDialogFromAnotherClass;
- public MyAsyncTaskClass(ProgressDialog dialogFromAnotherClass) {
- this.referenceToDialogFromAnotherClass = dialogeFromAnotherClass;
- }
- @Override
- public void onPostExecute() {
- this.referenceToDialogFromAnotherClass.show();
- // Do other stuff with the dialog like setting a title or text or something.
- }
- @Override
- public void doInBackground(args...) {
- // Do stuff in the background here.
- }
- @Override
- public void onPreExecute() {
- // We're done, so let's remove the dialog again.
- this.referenceToDialogFromAnotherClass.dismiss();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement