Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
  protected void processSections(Object[] sections) {

    this.sections.clear();
    for (int i = 0; i < sections.length; i++) {
      processSection(sections[i], -1);
    }
  }