[android-developers] Is there (or should there be), a generateId() method for dynamically generated Views?

2010-08-30 Thread Anil
Is there (or should there be), a generateId() method for dynamically generated Views? Take the RadioGroup example in APIDemos|App|Views. Radio buttons are added dynamically. For each button, you have to call setId(). To be notified when a radio button is selected, you register a onCheckedChange

Re: [android-developers] Is there (or should there be), a generateId() method for dynamically generated Views?

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 10:18 AM, Anil anil.r...@gmail.com wrote: Is there (or should there be), a generateId() method for dynamically generated Views? Addition seems to be sufficient. Since we are notified only the id of the checked view, shouldn't there be a way to uniquely generate the

Re: [android-developers] Is there (or should there be), a generateId() method for dynamically generated Views?

2010-08-30 Thread Kostya Vasilyev
It's also not quite correct that a radio button is only identified by its viewId. Using View.setTag (two versions), you can associate your own data item (s) with a view. However, I agree with Mark that using a ListView is quite likely to be a better solution. -- Kostya 30.08.2010 18:45,