On Tue, Sep 7, 2010 at 6:08 PM, Bret Foreman <bret.fore...@gmail.com> wrote: > I tried changing it to the name of the layout and got an exception > saying "java.lang.IllegalStateException: ArrayAdapter requires > the resource ID to be a TextView".
You are using the ArrayAdapter(Context context, int textViewResourceId) constructor. That second parameter is: "The resource ID for a layout file containing a TextView to use when instantiating views." Now, you have two choices: 1. Get rid of the LinearLayout from your row XML, since it is doing you no good, and have your layout purely be a TextView. Then, pass R.layout.whateverthebloodyhellitis to the constructor. 2. Switch to the ArrayAdapter(Context context, int resource, int textViewResourceId) constructor, where you tell it *both* the R.layout.whateverthebloodyhellitis and R.id.chooseTableRowTextView to the constructor. To put it another way, if you aren't telling the ArrayAdapter to use this layout file, how do you think it is going to know to use it? -- 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 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