String[] fourSub = {"Dog", "Horse", "Boat"};
for (int i = 0; i < fourSub.length; i++) {
View view = four.createSubItem(i);
((TextView) view.findViewById(R.id.sub_title)).setText(fourSub[i]);
}
<BUG>four.collapseSubItems();
ExpandingItem five = mExpandingList.createNewItem(R.layout.expanding_layout);
five.setIndicatorColorRes(R.color.green);</BUG>
five.setIndicatorIconRes(R.drawable.ic_ghost);
((TextView) five.findViewById(R.id.title)).setText("Rey");

String[] fourSub = {"Dog", "Horse", "Boat"};
for (int i = 0; i < fourSub.length; i++) {
View view = four.createSubItem(i);
((TextView) view.findViewById(R.id.sub_title)).setText(fourSub[i]);
}
four.collapseSubItems();
}
ExpandingItem five = mExpandingList.createNewItem(R.layout.expanding_layout);
if (five != null) {
five.setIndicatorColorRes(R.color.green);
five.setIndicatorIconRes(R.drawable.ic_ghost);
((TextView) five.findViewById(R.id.title)).setText("Rey");
