In an ExpandableListView, how can I show one additional line at the end of the child results?

Posted by fiXedd on Stack Overflow See other posts from Stack Overflow or by fiXedd
Published on 2009-06-01T23:31:03Z Indexed on 2010/05/30 17:02 UTC
Read the original article Hit count: 346

I have created a custom ExpandableListAdapter and everything works properly. What I'd like to be able to do is in each of the groups add a different type of child to the end. I have tried adding 1 to the getChildrenCount() number and then testing isLastChild in the getChildView() method, but that doesn't seem to work.

If a group has three children what I have working looks like this:

Group
    NormalChild
    NormalChild
    NormalChild

But I'd really like something like this:

Group
    NormalChild
    NormalChild
    NormalChild
    AlternateChild

The idea being that the AlternateChild could be a link to more info about the group. Any Ideas?

EDIT: ListView has addFooterView() which will allow you to add a footer to a whole ListView... wonder how to add them to the ExpandableListView's children, or if it's even possible

© Stack Overflow or respective owner

Related posts about java

Related posts about android