I have the following Dialog progress. This dialog progress is being Injected into the activity/fragments as needed. When I display this in an Activity it works perfectly fine. But when I try to show it inside a fragment in an activity it shows up below the dialog.
Any way to fix this class to show the progress dialog correctly, without having to manually pass the context to this class?
Progress Dialog Class
public class ProgressBuilder implements IProgressBuilder {
private ProgressDialog progressDialog;
@Inject
public ProgressBuilder(Provider<Context> contextProvider) {
this.progressDialog = new ProgressDialog(contextProvider.get());
}
public void show() {
this.show("Loading...", null);
}
public void show(String message) {
this.show(null, message);
}
public void show(String title, String message) {
this.progressDialog.setTitle(title);
this.progressDialog.setMessage(message);
this.progressDialog.show();
}
public void dismiss() {
this.progressDialog.dismiss();
}
}
Activity Class
public class MyActivity extends RoboFragmentActivity {
@Inject IProgressBuilder progress
}
This Fragment is shown on MainActivity
public class MyActivity extends RoboDialogFragment {
@Inject IProgressBuilder progress
}