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 9199285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:30:00+00:00 2026-06-17T22:30:00+00:00

I have a very nice dialog that does what I need. But I need

  • 0

I have a very nice dialog that does what I need. But I need to update it to the new standards.

this is my current dialog:

public class MyProgressDialog extends Dialog {

    private MyProgressDialog dialog;

    public MyProgressDialog(Context context) {
        super(context);
    }

    public MyProgressDialog show(Context context) {
        dialog = new MyProgressDialog(context);
        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
        dialog.setContentView(R.layout.progress);
        dialog.getWindow().setBackgroundDrawableResource(
                android.R.color.transparent);
        dialog.setCanceledOnTouchOutside(false);
        dialog.show();
        return dialog;
    }

    public void dismiss(Context context) {

        dialog.dismiss();

    }

}

I use this NON-Fragment Dialog already with Fragments and ListFragments (using support library 4) as ProgressDialogs. Unfortunately, on pages with Multiple fragments, they just stack on top of each other. So I want to associate each dialog with each fragment.

I call the dialog this way in the onPreExecute() of each of my Task‘s:

dialog = new MyProgressDialog(getActivity());

Is it possible to tweak my current setup to work as I need, or do I need to completely redo this from the ground up? I’ve looked at all the samples from Google and I can’t find much that even look close to what I am doing. Can I have some guidance n this transition? Whether it is links, code samples, or ideas to research?

EDIT in response to comment below:

@Override
public Fragment getItem(int position) {
    Fragment f = null;
    switch (position) {
    case 0: {
        f = new RateFragment();
        Bundle args = new Bundle();
        f.setArguments(args);
        break;
    }
    case 1: {
        f = new ReviewFragment();
        Bundle args = new Bundle();

        f.setArguments(args);
        break;
    }
    default:
        throw new IllegalArgumentException("not this many fragments: "
                + position);
    }

    return f;

}

Tablet Layout for this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/frags"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >

    <fragment
        android:id="@+id/cat_frag"
        android:layout_width="450dp"
        android:layout_height="match_parent"
        class="com.---.---.RateFragmentActivity$RateFragment" />

    <LinearLayout
        android:layout_width="4dp"
        android:layout_height="match_parent"
        android:background="#222" />

    <fragment
        android:id="@+id/featured_frag"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.---.---.RateFragmentActivity$ReviewFragment" />

</LinearLayout>
  • 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-17T22:30:02+00:00Added an answer on June 17, 2026 at 10:30 pm

    So I want to associate each dialog with each fragment.

    If you want to show the dialogs above the corresponding fragments that triggered the work then you can’t use a DialogFragment as this will place the dialog as a normal dialog.

    Instead you could use a normal Fragment shaped like your custom ProgressDialog and attach that to the container(which should be a RelativeLayout or FrameLayout) on top of the normal fragment/content.

    Is it possible to tweak my current setup to work as I need, or do I
    need to completely redo this from the ground up?

    If those pages with multiple fragments place those fragments in wrapper layouts then it’s pretty easy. If not you’ll need to make some changes that could be easy or very hard to make depending on how you built the current layouts.

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

Sidebar

Related Questions

I have this very nice regex that I got from the net which makes
I have an editor I am attempting to emulate that has some very nice
I am using Groovy SQL for my DB access. Very nice, but I have
I have a very simple problem but cannot find a nice solution. I have
The linux kernel (and various other projects including git) have very nice makefiles that
I've noticed a site that seems to have a very nice colour transition effect
A VERY nice to have would be if I could edit object-literals in this
I have created this code to do a very nice, elegant pull-down sidebar navigation
I have come across http://redactorjs.com which is a very nice wysiwig editor that has
So I have this grid. It's a very nice grid. Lovely, really. Except when

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.