Monday, February 7, 2011

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

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("hellooooo") ;
textView.setId(10) ;


But need some method which assigns my string value as ID...

Like
textView.setId( someMethod("textViewId") ) ;


Please Reply...

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment