androidpicassookhttpimage-loadinghttpbackend

Android-How do i get image urls stored on a server then load the images using picasso


Issues Faced

I was able to get image url data using Okhttp but then store it on an arraylist but was faced with an issue because this processes takes time so when my activity start the view is seen before the data is received.

I am querying image urls from the server then displaying/loading them to a recycler view using picasso help please...?


Solution

  • Loading the data from the api should be an asynchronous process, if you want to notify the user while that is happening, you can show a progress bar.

    Upon receiving the data from the server, hide the progress bar and then load the images in the picasso, you can also specify a default image to picasso, which will be shown while the image itself is being loaded.