In ExpandableListView, how can I show one extra row at the end of the results for a child?

I created a custom ExpandableListAdapter and everything works correctly. What I would like to do is that in each group a different type of child is added to the end. I tried adding 1 to the number getChildrenCount()and then testing isLastChildin the method getChildView(), but this does not seem to work.

If the group has three children, what works for me is as follows:

Group
    Normalchild
    Normalchild
    Normalchild

But I would really like something like this:

Group
    Normalchild
    Normalchild
    Normalchild
    Alternatechild

The idea is that it AlternateChildcan be a link to additional information about the group. Any ideas?

EDIT: ListView addFooterView(), ListView... , ExpandableListView , ,

+3
2

, .

, ListView , , AlternateChild isAlternateChild ( NormalChild IChild, NormalChild AlternateChild.

getChildView , , , , .

/ ExtendedListView . , AlternateChild , , .

+2

-,

, , . , .

0

Source: https://habr.com/ru/post/1709563/


All Articles