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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:26:35+00:00 2026-05-31T07:26:35+00:00

In my application, I have the Activity and several Fragments (Activity works as Controller

  • 0

In my application, I have the Activity and several Fragments (Activity works as Controller and Fragments – as views)

In some of Fragments I need to show AlertDialogs and ProgressDialogs, Activity can change current Fragment.

My problem is: activity can receive broadcasts and C2DM notifications, and when I created AlertDialog, Activity can change fragment, but Dialog stays. So when user clicks on some buttons, app crashes.

DIalogFragments works like a simple Dialog.

Have I dismiss dialog manually or check if fragment is active? Is there any built-in tools?

  • 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-05-31T07:26:36+00:00Added an answer on May 31, 2026 at 7:26 am

    First of all I might be missing something, no code etc to go by but…

    Secondly: maybe you shouldn’t be using dialoges? Seems like a cumbersome user interface. Just use fragments for those as well? Though you say you are using DialogFragments so maybe you’ve already thought about that and use them as “regular” fragments already.

    Thirdly: Dismiss the dialogs when the fragment that showed is removed/hidden then? Use the onStop() callback for example in the fragment or a more central place where you are perhaps saving the currently showing fragment and deciding to display a new one.
    Dismiss the dialog by calling ´dismiss´ on the Dialog object or Fragment or dismissDialog in the Activity.

    See dismissing dialog: http://developer.android.com/guide/topics/ui/dialogs.html#DismissingADialog

    You can still call dismiss on those DialogFragments.
    http://developer.android.com/reference/android/app/DialogFragment.htm

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

Sidebar

Related Questions

I have an Android application composed by several Activities. Most of them need to
I have activity stack in my android application.Suppose A and B.When the application starts
In my Android Application I have a Google MapView Activity and I am facing
I have an application that records activity in a table (Oracle 10g). The logging
I have an single Activity application that starts a Service and binds to it.
I have an application that reuses an Activity an unknown number of times. It
I have an application and every new created activity will start an async task
In my application, in an activity i have 4 edit Text fields and a
I have to create a UML activity diagrams for a searching application for a
I have a web-based application that notifies users of activity on the site via

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.