Closed andersonkxiass closed 8 years ago
fixed, when a section is empty just need to increase the current firstSectionPosition++.
int firstSectionPosition = 0; //Header index
List<AdapterBaseRow> adapterBaseRows = new ArrayList<>();
//Header
adapterBaseRows.add(new AdapterRowHeader(new User("Google I/O 2010"), firstSectionPosition));
//items
adapterBaseRows.add(new AdapterRowPicture(new Picture(R.drawable.picture_1), firstSectionPosition));
adapterBaseRows.add(new AdapterRowPicture(new Picture(R.drawable.picture_3), firstSectionPosition));
firstSectionPosition = 4; //Header index
//Header
adapterBaseRows.add(new AdapterRowHeader(new User("Google I/O 2011"), firstSectionPosition));
firstSectionPosition = 5; //Header index
...
I have a App that shows a timeline with name of people, sometimes some section have no content, my questions is, what must be the behavior of the section Id?