I have problem adding children ,when i add one child then on ui two child appear with same childposition..my problem is similar to these mentioned in following questions
Child Layout is repeating many times in ExpandableListView
https://stackoverflow.com/questions/10938763/double-child-entries-in-expandablelistview
But unable to find a solution .. please see my code here
Value for children is given using this double dimension array..
String[][] child = {
mContext.getResources().getStringArray(R.array.alerts),
mContext.getResources().getStringArray(R.array.alerts),
mContext.getResources().getStringArray(R.array.alerts),
mContext.getResources().getStringArray(R.array.alerts),
mContext.getResources().getStringArray(R.array.alerts) };
I used this :
@Override
public int getChildrenCount(int groupPosition) {
return child.length;
}
but for this also child count is 5 and it shows up 10 items..
It seems you are hard-coded child position like,
where as it should be
your_data_collection_sizeAlso, you have hard-coded childId like,
which should be
childPositionnot0If you further have any query/problem you can download and check my
demo example from you githuband can come back to me with your query if you have any thereafter.