[android-developers] Programatically assigning String value as 'Id'

2011-02-07 Thread Jawwad Farooq
Hi All, I want to know, Is there any way to assign string value as ID for the component programatically. I am doing something like this: TextView textView = new TextView(this) ; textView.setText(hello) ; textView.setId(10) ; But need some method which assigns my string value as ID... Like

Re: [android-developers] Programatically assigning String value as 'Id'

2011-02-07 Thread Kostya Vasilyev
http://developer.android.com/reference/android/content/res/Resources.html#getIdentifier(java.lang.String, java.lang.String, java.lang.String) 07.02.2011 13:34, Jawwad Farooq пишет: Hi All, I want to know, Is there any way to assign string value as ID for the component programatically. I am

Re: [android-developers] Programatically assigning String value as 'Id'

2011-02-07 Thread Jawwad Farooq
But in my case that resource does not exist. I have to dynamically create and assign ID to that. Kostya Vasilyev wrote: http://developer.android.com/reference/android/content/res/Resources.html#getIdentifier(java.lang.String, java.lang.String, java.lang.String) 07.02.2011 13:34, Jawwad

Re: [android-developers] Programatically assigning String value as 'Id'

2011-02-07 Thread Marcin Orlowski
On 7 February 2011 12:31, Jawwad Farooq jawwad.far...@gmail.com wrote: But in my case that resource does not exist. I have to dynamically create and assign ID to that. Doubt you can with system api. But if you really need such feature, wrap resouce access with own class - then you will be able