On Wed, Sep 15, 2010 at 8:35 AM, Christophe < christophe.lebesner...@gmail.com> wrote:
> > 1 - Your getRadioButton function returns a new RadioButton. > > since I want 10 different radio buttons in my group, I can reuse the > same radio button ?!? > The code you posted adds 10 RBs to a group. Then your get function returns a new one that's not associated with anything. How do you expect that to work? You're basically saying, "when getting a Radio Button, instead of getting one I already created, make a new one and if was trying to get the first one, set it to checked. Also, don't associate it with a group so its checked state won't effect others." > > 2 - You're using getApplicationContext(). > > I have try with just "this" instead of "getApplicationContext()", but the > problem is still there > This won't fix your problem (see #1), but you should avoid getApplicationContext(). It will cause you problems elsewhere. Should I use something else ? Your most local Context ... usually "this". On Wed, Sep 15, 2010 at 8:38 AM, Kumar Bibek <coomar....@gmail.com> wrote: > 1. New Radio button: I dont see a problem with that. He already created 10 and the "new" ones don't get added to the group. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- 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