Problems with retrofit and picasso

1

I have a problem with my retrofit and picasso, when calling the server that is a json I need to show a list of images, but when I open the app I get a repeated image but if I close and open the app I load another but repeated, try to verify with a Log if they all had the same route and if but it is folder address, then I am looking for an option to show it different in the list of my activity.

title.setText(dir.getTitle().subSequence(0, dir.getTitle().length())); comment.setText( dir.getComment().subSequence(0, dir.getComment().length())); publishedAt.setText(dir.getPublishedAt().subSequence(0, dir.getPublishedAt().length())); Picasso.with(activity).load(dir.getPicture()).into(picture);

    
asked by Jonathan Vazquez 13.12.2016 в 04:43
source

1 answer

0

When loading your image when executing the code that you expose, possibly within getView() , you have to ensure that the image it loads is different in each request, in this case dir.getPicture() , if it does not change, that's probably the cause to see repeated images:

 Picasso.with(activity).load(dir.getPicture()).into(picture);

dir.getPicture() , must contain a different url according to the element within ListView .

    
answered by 13.12.2016 в 17:52