Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9029571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:16:39+00:00 2026-06-16T07:16:39+00:00

I have the following Dialog progress. This dialog progress is being Injected into the

  • 0

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

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:16:40+00:00Added an answer on June 16, 2026 at 7:16 am

    You really should be using a DialogFragment for this.

    There’s a ton of examples in the documentation:

    developer.android.com/reference/android/app/DialogFragment.html

    You would simply wrap a ProgressDialog with a subclass of a DialogFragment. Use the example from the docs where they are wrapping an AlertDialog, and replace that with a ProgressDialog and you’re set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following issue: I open a dialog box with jQuery UI. This
I have an activity that appears as a dialog using the following custom theme:
I have the following: container.dialog().bind('dialogopen', function(event, ui) { ... if (someCondition) { $(this).dialog('close'); //
I have the following $('.quickview-dialog-left').load('/productlargetest .productlargeimage a'); the href of this a tag is
I have the following dialog in main activity: @Override protected Dialog onCreateDialog(int id) {
I have the following Jquery that returns values from a dialog Box and fills
I have the following Problem: I have already opened a JQuery dialog and I
I have the following structure: in UIActivity1: MyMyProgressDialogFragment progressDialog = MyMyProgressDialogFragment.newInstance(); progressDialog.show(getFragmentManager(),dialog); getFragmentManager().executePendingTransactions(); ..do
I have a modal dialog that is created with the following: procedure TFormCompose.createParams(var Params:
I have JQuery UI Dialog opening on pressing CTRL + Q using the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.