On Mon, Sep 27, 2010 at 12:53 PM, greenset <[email protected]> wrote: > I have an xml layout that will display a grid made up of textviews > within tablerows. The textview names are cell00, cell01, etc. At > runtime, my program will determine which cell needs to be changed. > > Is there a way get format a name so that it can be passed to the > findViewById method at runtime?
Use getResources().getIdentifier(), but please be sure to cache the results, since they are discovered via reflection and are relatively expensive to look up. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

