Prototik / HoloEverywhere

NO LONGER MAINTAINED. DEVELOP FOR 4.X+ DUDE.
MIT License
2.18k stars 608 forks source link

Spinner on actionbar and listview is blank after notifydatasetchanged() #824

Open 0iron0 opened 10 years ago

0iron0 commented 10 years ago

I met a same issue(#764).

I have a spinner(navigation) as custom view on actionbar and a listview to show some doucuments data. when I change navigation(onItemSelected()), it will tigger updateNavigation() to update data source for navigation(notifyDatasetChanged()), and clear the data of listview(notifyDatasetChanged() to show empty view), then it will trigger a runnable to get new data of folder and show a loading dialog, when message return to handler, it will invoke notifyDatasetChanged() for listview to show new data.

But, I got a empty view because it seems getView() is not invoked.

And I tried build-in spinner, it is no this issue.

Same as http://stackoverflow.com/questions/21282964/notifiydatasetchanged-makes-listview-disappear-until-touch/22411606#22411606

0iron0 commented 10 years ago

I found if I call notifyDatasetChanged() in onItemSelected() callback, then the listview cannot be refresh anymore.