Marian Schedenig wrote: > In my activity I have two radio buttons which both require additional > input. Clicking either button opens a dialog, and only clicking "set" > in that dialog really activates the option. I therefore want to > prevent the radio button from being checked before the value is set, > i.e. I want to prevent it from being automatically checked when the > user clicks it. In my dialog listener I will then manually check the > respective button. > > I could just keep the current state of the radio group in a variable > and instantly re-set it whenever a radio button is clicked, but > perhaps there is a more correct way to do this?
I'm skeptical that using radio buttons is the correct UI choice. Consider a couple of regular Buttons to launch your dialog(s) and an ImageView showing an icon indicating the user's choice, or something like that. The point behind common widgets, like radio buttons, is to make the user's life easier via a consistent experience. Users, when they see radio buttons, will expect standard behavior. The more you depart from that behavior, the more confused your users may get. Having a radio button pop a dialog, IMHO, is an unexpected behavior. Having a radio button pop a dialog, and then *not* have that radio button behave like a radio button (i.e., be selected) based upon your own rules, IMHO, is *really* unexpected behavior. If you want to stick with radio buttons, though, I suspect your current implementation is going to be about as good as it gets. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---