我有一个基于Jeff Sharkey实现的分段列表视图。问题是仅显示列表视图的一部分(最后一个)。以下是我添加这些部分的方法:
SeparatedListAdapter adapter = new SeparatedListAdapter(this);
for (int i = 0; i < groups.size(); ++i) // groups is an ArrayList<ArrayList<Person>>
{
ArrayList<Person> group = groups.get(i);
adapter.addSection("Section test", new MyCustomAdapter(this, R.layout.custom_cell, group));
}
ListView listView = (ListView) findViewById(R.id.myListView);
listView.setAdapter(adapter);