I think that, longer term, you should try using SimpleAdapter, or even
SimpleCursorAdapter, since your data comes, or will come, from a
database. Then you have the capability of defining a ViewBinder which
lets you be very flexible in how you display your data.

For your current situation, I think you want to override getView in
the adapter and set the data you want displayed when you have an
instance of your inner views available.

On Jan 12, 9:25 am, Blocks <[email protected]> wrote:
> I am trying to display a list of names from a database and I have
> populated an array of type foo [] where foo is a class that returns
> long, String1, String2, String3, double. I have 4 elements in the
> array and I am seeing 4 rows in the list showing as format
> com.domain.package.classn...@43ccde40  (1st row, 2nd is another hex
> string and so on).
>
> I'm using:-
>
> private void fillData() {
>      Foo [] foos = mDbHelper.fetchFoos(displayState);
>
>        ArrayAdapter<Foo> fooAdapter =
>            (foos == null || foos.length == 0 ?
>             null :
>             new ArrayAdapter<Foo>(this, R.layout.foo_row, foos));
>        setListAdapter(fooAdapter);
>    }
>
> How do I get just String3 to show in the listview?
-- 
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

Reply via email to