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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:13:08+00:00 2026-05-27T20:13:08+00:00

through the help of various tutorials, I’ve managed to write a custom dialog that

  • 0

through the help of various tutorials, I’ve managed to write a custom dialog that displays a listview populated by records from a local database. I have set click listeners and figured out how to retrieve the record at the listview item clicked by setting the cursor at the position returned and so on…Now what I want to do is, dismiss this dialog when an item is clicked, and automatically open a new dialog with this cursor’s content as the name of the table from which to re-populate the new listview. I’d like to know if anyone knows the best way of doing this in terms of application structure.
Currently, I am calling my dialog to show in my Activity like this:

public void onClick(View view) {
    switch(view.getId()) {
    case R.id.pickerbutton:
        showDialog(DIALOG_PICK_CATEGORY);
        break;
    }
}
protected Dialog onCreateDialog(int id) {
    dialog = null;
    switch(id) {
    case DIALOG_PICK_CATEGORY:
        CustomDialogList.Builder customBuilder = new
            CustomDialogList.Builder(SendCookieActivity.this);
        customBuilder.setTitle(R.string.category);
        dialog = customBuilder.create();

        break;
    }
    return dialog;
}

After this dialog is shown, the user picks a category from the CustomDialogList dialog. I am having a hard time thinking of how to make it so that after the category is picked, this dialog is dismissed (or looks like it’s dismissed) and the same one with newly populated items appears (or can be a completely new dialog too). and when someone presses the back button, the previous dialog is shown. Think of it as a file explorer but with only two levels of depth. I’d like to keep using my CustomDialogList because I have customized its look to match everything else in my app. Perhaps what would help me with this problem besides or instead of code, would be some diagrams of how this type of UI flow has been implemented before along with some pseudo code.

Thanks.

  • 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-27T20:13:08+00:00Added an answer on May 27, 2026 at 8:13 pm

    Assuming your custom dialog extends Dialog (or one its sub-classes). Have your Activity implement DialogInterface.onDismissListener. Then after you create the dialog with…

    dialog = customBuilder.create();
    

    …use dialog.setOnDismissListener(this); before you show it.

    Your Activity will have to implement…

    @Override
    public void onDismiss(DialogInterface dialog) {
        // Identify which dialog was dismissed and do something
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've gone through various tutorials and Stack Overflow posts and understand that Selenium can
I went through a document at Adobe Livedocs that describes working with pdf: http://livedocs.adobe.com/flex/3/html/help.html?content=PDF_1.html
Through CommandName=Delete I try to delete a line from the ListView control but not
I have tried googling and read through https://help.github.com/en/articles/connecting-to-github-with-ssh and various, various guides. I am
I have a utility method that goes through various classes and recursively retrieves the
I'm trying to create a function that will loop through an array of various
Can anybody help me how to run a python script through command line? My
I've gone through most of the example code and I still need some help.
could someone help me on this problem, i want to access facebook API through
Hi i'v look through the WMI class... but none can help me in getting

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.