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, 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 id? Say, a View.generateId()
method...
Why not radioButtonId++?

In the example, the ids are statically defined in ids.xml. However
this limits the number of  radio buttons.
IMHO, if you are concerned about the number of radio buttons, you
should be using a ListView.



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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

Reply via email to