ListView is cut off when viewing remote server with Android Studio

0

I have an activity with tabs, and in a fragment of these tab I load a list View, in this fragment I have a class that inherits from AsyncTask and what it does is bring from a webapi a list of names of people and the route to an image that is on another server, then in the ListView Adapter when I set up the name field, I look for the image as well.

imagenb = Utils.getBitmapFromURL("http://servidor.com.ar/imagenes/imagen1.jpg");

This then I put it in ImageView .

What happens to me when I run the app on my cell phone, it reaches a certain element in the listview and it is cut, and in the log it gives the following error:

  

I / Choreographer: Skipped 388 frames! The application may be doing too   much work on its main thread.

I guess it's because it makes many calls to the server to bring the image, how can I solve this? I thought for example doing some process on the outside and saving the images in the bd that the webapi consults. Or bring the image in an event of the listview, I do not know if there is something that when you scroll in the list view you are bringing and not everything at once.

Well I hope you can help me, thanks.

    
asked by Lucho 18.04.2018 в 14:38
source

0 answers