zdunaisky-chwy / android-section-list

Automatically exported from code.google.com/p/android-section-list
Other
0 stars 0 forks source link

Moving section is overlapped #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This issue appears when i try to load all the section adapter again.

My app loads the sections and data dynamically, therefore, i can change the 
filters and the data and sections will change.

The problem is that i see in the first section the old section i had, and on 
top of it, the new section (the one with the new data).

The image attached is self descriptive.

To reproduce it (following your example), add a button somewhere, or use the 
menu, and initialize all the data again.
Use another array of data to see the problem clearly.

//on menu button click event, do this
arrayAdapter = new StandardArrayAdapter(this,R.id.example_text_view, 
differentArray);
sectionAdapter = new SectionListAdapter(getLayoutInflater(), arrayAdapter);
final SectionListView listView = (SectionListView) 
findViewById(R.id.section_list_view);
listView.setAdapter(sectionAdapter);

Thanks a lot!

Original issue reported on code.google.com by mcolo...@blyts.com on 1 Jul 2011 at 6:02

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! It's fixed. I missed the case about replacing adapter, I was more into 
doing  it by notifyDataSetChanged(), but you are right - replacing an  adapter 
is also a valid. Case. Thanks for detailed and clear explanation!

Original comment by ja...@potiuk.com on 1 Jul 2011 at 6:21