if (!super.isEnabled(position))
return false;
ListItem item = (ListItem) getItem(position);
+ if (item == null)
+ return false;
return item.getEnabled();
}
}
- public static class ListItemAdapter extends ArrayAdapter<ListItem> {
+ public class ListItemAdapter extends ArrayAdapter<ListItem> {
public ListItemAdapter(Context context) {
super(context, 0);
}
public void setSort(Comparator<ListItem> sorter) {
this.sorter = sorter;
notifyDataSetChanged();
+ mAdapter.notifyDataSetChanged();
}
public Comparator<ListItem> getSort() {
public void addSection(String section, T adapter) {
this.headers.add(section);
this.sections.put(section, adapter);
+ notifyDataSetChanged();
}
public void addSection(int index, String section, T adapter) {
this.headers.insert(section, index);
this.sections.put(section, adapter);
+ notifyDataSetChanged();
}
public void removeSection(String section) {
this.headers.remove(section);
this.sections.remove(section);
+ notifyDataSetChanged();
}
public T getSection(String section) {