Hi, all. I'm a longtime developer but new to Android. I want to learn how to instantiate visual components in code rather than XML, so that I better understand the API, and can build UI's dynamically.
I want to do this with a ListView. I understand that the ListView's underlying data is provided by an implementation of ListAdapter. However, when I research the implementations of ListAdapter, I don't see anything that seems to be helpful. ArrayAdapter seems to be the closest to what I want, but all its constructors require a textViewResourceId, defined as "the resource ID for a layout file containing a TextView to use when instantiating views". But I'm building everything in code, even the top level View passed to setContentView(). I was under the impression that anything created with xml configuration files could also be created using the API. How can I do this? Also, do I need to define id's for the objects provided by the adapter, or is this not necessary because I can refer to them as Java objects in my code? Thanks for any help. - Keith -- 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