Let's try some pedagogy
The ArrayAdapter constructor has two arguments of interest when it comes to the layout, namely the ResourceId(R.layout.listrow in your case) and the textResourceId (R.id.list_symbol in your case).
What the ArrayAdapter does is the following: If no textResourceId is specified in the constructor (i.e. if your remove the R.id.list_symbol argument), it assumes that the entire Resource View (R.layout.listrow in your case) Is a TextView. It will then use the setText-method on that object. However, if you do specify the resource, it will look in the Resource for a textview with the id you specified and use that. You can see it pretty easily in
http://android.git.kernel.org/?p=platfo ... va;hb=HEAD
in the createViewFromResource-method (always good to look at the source). In the code, "resource" is the resource your specified, and mFieldId is the textResourceId. As you can see, if there is no textResourceId, it will assume that the entire layout is just a TextView. On the other hand, if you have provided it with a text-id, it will look in the layout for a TextView with the Id you specified (mFieldId).
That being said, the ArrayAdapter assumes that Either you provide it with just a listview, or a View containing a TextView with the textResourceId you supplied. Thus, it does not support more than one textfield. Now there are some other adapters, for instance the SimpleAdapter which gives you more control. There's a good example at
http://mylifewithandroid.blogspot.com/2 ... apter.html
where the creator makes a list where each entry consists of two TextViews. Another option is to write your own Adapter and make your own getView-method.
As for you OnClick-question, try to get the different TextViews by using
Using java Syntax Highlighting
TextView symbol = (TextView)v.findViewById(R.id.list_symbol)
TextView price= (TextView)v.findViewById(R.id.list_price)
Parsed in 0.035 seconds, using
GeSHi 1.0.8.4
That is, you look in the View called v (which is the entire list-item, a R.layout.listrow in your case), for the different sub-views.
Hope it all made sense
