Я использую SeperatedListAdapter, доступный здесь: http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/
но я хочу создать список с нижним колонтитулом для каждого раздела. я не знаю, как мне это сделать.
Любое другое решение для создания раздела-списка с нижним колонтитулом для каждого раздела будет полезно.
изм:
Теперь я меняю адаптер, как показано ниже:
footers = new ArrayAdapter<String>(context, R.layout.footer_layout);
public int getCount() {
// total together all sections, plus one for each section header
int total = 0;
for(Adapter adapter : this.sections.values())
total += adapter.getCount() + 2;
return total;
}
//@Override
public View getView(int position, View convertView, ViewGroup parent) {
int sectionnum = 0;
for(Object section : this.sections.keySet()) {
Adapter adapter = sections.get(section);
int size = adapter.getCount() + 2;
// check if position inside this section
if(position == 0) return headers.getView(sectionnum, convertView, parent);
if(position < size-1) return adapter.getView(position - 1, convertView, parent);
if(position == size -1) return headers.getView(sectionnum, convertView, parent);
// otherwise jump into next section
position -= size;
sectionnum++;
}
return null;
}
но я получаю исключение индекса