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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:54:58+00:00 2026-05-26T23:54:58+00:00

This is more of a UX issue than a real problem but it would

  • 0

This is more of a UX issue than a real problem but it would be nice if I can fix it.

I’m creating a single choice AlertDialog similar to the image…

enter image description here

The code I use to create it is…

private void createGuideViewChooserDialog() {
    AlertDialog.Builder builder = new AlertDialog.Builder(this);
    builder.setTitle("Select Guide View");
    builder.setSingleChoiceItems(guideViewChooserDialogItems, currentGuideView, this);
    guideViewChooserDialog = builder.create();
    guideViewChooserDialog.show();
}

…so basically I use an int called currentGuideView to set which radio-button is shown as selected and my Activity implements DialogInterface.OnClickListener hence using this in the call to setSingleChoiceItems(...).

The onClick(...) listener does some simple things based on the item selected then calls guideViewChooserDialog.cancel().

The problem I’m having is when I touch one of the list items, the item is briefly highlighted to acknowledge the touch BUT the AlertDialog disappears without showing a change of selected radio-button.

Everything works fine and my onClick(...) listener gets which item was touched but it’s just a bit disconcerting that the dialog disappears without seeing the radio-button selection change.

I’m testing this on an HTC Desire w/ Android v2.2. Is this planned behaviour or a bug in either v2.2 or the HTC implementation of it? Is there anything I can (or should) do so the selected item’s radio-button is correctly shown as selected before the dialog disappears?

  • 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-26T23:54:59+00:00Added an answer on May 26, 2026 at 11:54 pm

    The dialog is getting dimissed immediately because that’s what you must have set it to do in your DialogInterface.CnClickListener. If you don’t want it to be dimissed, then add a button for the user to click “ok”, confirming their radio choice and then dismiss the dialog.

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

Sidebar

Related Questions

This is more a 'wonder why' than a specific issue but look at the
This is more of a licencing issue than a code question. I really like
This is more an observation than a real question: MS-Access (and VBA in general)
I've been investigating this issue that only seems to get worse the more I
This is more a general question but my particular case involves a ruby/rails app
This is more of a philosophical question than anything, so give me your thoughts.
I'm having real trouble getting my head around this issue. As the title suggests,
I want to know this more in detail. Is it a realtime scheduler? An
To make this more clear, I'm going to put code samples: $file = fopen('filename.ext',
I am wondering if there is a way to handle this more elegantly. After

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.