-1

I am using Android Dev smart library for my list view.I am downloading the images and add to the listview.But when i click the link it doesn't show me the all downloaded images in first time,Then i click the back button and again click the link.Then it shows me all images?why it doesn't show me the first time all the images?

  • 1
    it looks like you forget to call notifyDatasetChanged() in adapter. Could you please show your code? – anil Dec 21 '14 at 15:04
  • Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example. – Panther Dec 21 '14 at 15:37
  • where should i called the notifyDataSetChanged() ? – pannila vitanage Dec 22 '14 at 01:13
  • anywhere on the main thread, you can [this](http://stackoverflow.com/questions/27471784/adding-arraylist-objects-to-gridview-in-android/27475541#27475541) out, take a close look at the notifydatasetchanged, that makes easy for to call it from anywhere – Elltz Dec 28 '14 at 10:15

1 Answers1

0

Call notifydatasetchanged when your data was changed and you need to update data in your adapter. I think here's a good example for notifydatasetchanged: https://stackoverflow.com/a/5092485

Community
  • 1
  • 1
QArea
  • 4,955
  • 1
  • 12
  • 22