public void appendSection(Object section) { if (section instanceof Object[]) { Object[] secs = (Object[]) section; for (int i = 0; i < secs.length; i++) { processSection(secs[i], -1); } } else { processSection(section, -1); } adapter.notifyDataSetChanged(); }
public void insertSectionAt(int index, Object section) { if (index > sections.size()) { Log.e(TAG, "Invalid index to insert/replace section"); return; } if (section instanceof Object[]) { Object[] secs = (Object[]) section; for (int i = 0; i < secs.length; i++) { processSection(secs[i], index); index++; } } else { processSection(section, index); } adapter.notifyDataSetChanged(); }
protected void processSections(Object[] sections) { this.sections.clear(); for (int i = 0; i < sections.length; i++) { processSection(sections[i], -1); } }