}
public boolean isEnabled(int position) {
- // Header (negative positions will throw an ArrayIndexOutOfBoundsException)
+ // Header (negative positions will throw an IndexOutOfBoundsException)
int numHeaders = getHeadersCount();
if (position < numHeaders) {
return mHeaderViewInfos.get(position).isSelectable;
}
}
- // Footer (off-limits positions will throw an ArrayIndexOutOfBoundsException)
+ // Footer (off-limits positions will throw an IndexOutOfBoundsException)
return mFooterViewInfos.get(adjPosition - adapterCount).isSelectable;
}
public Object getItem(int position) {
- // Header (negative positions will throw an ArrayIndexOutOfBoundsException)
+ // Header (negative positions will throw an IndexOutOfBoundsException)
int numHeaders = getHeadersCount();
if (position < numHeaders) {
return mHeaderViewInfos.get(position).data;
}
}
- // Footer (off-limits positions will throw an ArrayIndexOutOfBoundsException)
+ // Footer (off-limits positions will throw an IndexOutOfBoundsException)
return mFooterViewInfos.get(adjPosition - adapterCount).data;
}
}
public View getView(int position, View convertView, ViewGroup parent) {
- // Header (negative positions will throw an ArrayIndexOutOfBoundsException)
+ // Header (negative positions will throw an IndexOutOfBoundsException)
int numHeaders = getHeadersCount();
if (position < numHeaders) {
return mHeaderViewInfos.get(position).view;
}
}
- // Footer (off-limits positions will throw an ArrayIndexOutOfBoundsException)
+ // Footer (off-limits positions will throw an IndexOutOfBoundsException)
return mFooterViewInfos.get(adjPosition - adapterCount).view;
}