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

2010-10-17 Thread Dianne Hackborn
On Mon, Aug 30, 2010 at 12:11 PM, Anil wrote: > Because it could potentially clash with the automatically generated > ids. (Unless I am missing something). > Resource IDs are always >= 0x0100. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send privat

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

2010-10-17 Thread Kevin Kovach
What about situations where you need the id of a dynamically created view for use in LayoutParams? Say I want to position a new view to the right of a previously created view in a relative layout? How do you get a hold of those views if you have only used setTag() or nothing at all? Thanks. - K

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

2010-08-30 Thread Mike dg
Yes, Look into the ListView with setChoiceMode(CHOICE_MODE_SINGLE) -Mike DG On Aug 30, 11:47 am, Bret Foreman wrote: > Is there a way to make a ListView mutually exclusive like a RadioGroup > so that selecting one item deselects the others? > > > > > > > > > > > IMHO, if you are concerned about

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

2010-08-30 Thread Anil
ok, I did not know that. On Aug 30, 10:54 am, Kostya Vasilyev wrote: >   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 Li

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

2010-08-30 Thread Anil
Because it could potentially clash with the automatically generated ids. (Unless I am missing something). On Aug 30, 10:45 am, Mark Murphy wrote: > Why not radioButtonId++? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this g

Re: [android-developers] Re: 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 11:47 AM, Bret Foreman wrote: > Is there a way to make a ListView mutually exclusive like a RadioGroup > so that selecting one item deselects the others? android:choiceMode="single" and a row layout that is a CheckedTextView works. -- Mark Murphy (a Commons Guy) http://c

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

2010-08-30 Thread Bret Foreman
Is there a way to make a ListView mutually exclusive like a RadioGroup so that selecting one item deselects the others? > > IMHO, if you are concerned about the number of radio buttons, you > should be using a ListView. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.co