I'm trying to create a ListView that has different layouts in it.
Basically headers which contain only one string, and then items under
the headers that have a string and a picture.  So something like


HEADER A
img1 : item A1text
img2 : item A2 text
img3 : item A3 text
HEADER B
img1 : item B1text
img2 : item B2 text

I've created a custom ArrayAdapter, but the constructor takes a
textViewResourceId which specifies what layout the items in the list
will use to display.  My problem is I have 2 formats.  One for the
header and one for the item.  So in the below example, OrderAdapter is
passed R.layout.header. (header is defined by header.xml).

this.m_adapter = new OrderAdapter(this, R.layout.header, m_orders);

I need OrderAdapter to handle R.layout.header AND R.layout.item
(item.xml defines a ImageView and a textView, header.xml only defines
TextView).

How is this done?

Thanks

-- 
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