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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:02:42+00:00 2026-05-27T15:02:42+00:00

The custom dialog does dismiss at certain points in my program, for example when

  • 0

The custom dialog does dismiss at certain points in my program, for example when they press an “Edit” button, but the dialog will not dismiss if I select something from a list view and press an “Add” button. Both buttons end up using this same code below, but the if statements decide which will execute. Either way, the problem is that pcDialog.dismiss() is outside of the if statements, so it should dismiss always…but it doesn’t.

Any ideas on what the problem might be? My dialog is declared outside of any methods as a member.

createDoneBtn.setOnClickListener(
                new View.OnClickListener() 
                {   
                    @Override
                    public void onClick(View v) 
                    {
                        if ( !editingPC )
                        {
                            ...
                        }
                        else if ( editingPC )
                        {
                            ...
                        }
                        adapter.notifyDataSetChanged();
                        pcDialog.dismiss();
                    }
                });
  • 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-27T15:02:43+00:00Added an answer on May 27, 2026 at 3:02 pm

    Maybe this one dismisses ok, but your code makes a second one to immediately appear?
    Or maybe an exception is thrown but gets silently caught so you never step into dismiss() ?

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

Sidebar

Related Questions

I added a custom button to my jQuery UI dialog titlebar, as follows: $('#dialog').html(html);
I'm attempting to implement a custom search dialog in a WPF program. The Parent
I created a custom dialog that extends Dialog. One button on that the dialog
Does anybody knows how can I set margins to a custom dialog? I'm asking
I have created a custom dialog for Visual Studio Setup Project using the steps
I am implementing a custom dialog to form an about screen with a simple
I need create custom dialog and put JPanel into it. Is it possible?
I have a custom Dialog that contains only a TextView to display some text
I extended JDialog to create a custom dialog where the user must fill some
I'm trying to generate a custom dialog in Android. I create my Dialog like

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.