views:

128

answers:

1

I am looking to find out how to assign an image to a imageview in each child of an expandable list.

If anyone has any information or links to find out how to do this I would be most appreciative.

expListAdapter =
            new SimpleExpandableListAdapter( 
                main.this,
                createGroupList(),
                R.layout.parentnode,
                new String[] { "day", "number" },
                new int[] { R.id.TextView01, R.id.TextView02 },
                createChildList(),
                R.layout.child_row,
                new String[] { "image", "childName", "date"},
                new int[] { R.id.ImageView01, R.id.childname, R.id.date }
            );
        setListAdapter( expListAdapter );

is what my adapter looks like at the moment, I have very little experience in customising adapters so I do not know where to start.

Any help would be great :D

A: 

You will need to extend the Adapter class and override the getView method. In it, you can modify any of the fields, with the results of the Cursor query.

Reflog