java - Isn't notifyDataSetChanged enough to force an adapter to redisplay the items it holds? -
in direct subclass of pageradapter
in construction pass in empty list<string>
list use functionality.
in background task fetch/create strings should passed derived adapter , fragment do: derivedadapter.notifydatasetchanged()
.
inside derivedadapter
have overriden method follows:
@override public void notifydatasetchanged() { items.clear(); items.addall(getcurrentcreatedlist()); super.notifydatasetchanged(); }
but view pager, have set adapter not display anything. misunderstanding adapters , notifydatasetchanged()?
note: if start adapter full list, works perfectly
update:
if recreate adaptor @ point , reset it works fine. updating via notifydatasetchanged not seem work.
perhaps misunderstanding supposed do?
Comments
Post a Comment