There is a list, in each element there should be a picture. Pictures in the form of http links.

Is there really no way to load pictures in the main stream without bothering with the creation of new streams?

    3 answers 3

    Of course there is! for this you can use the Picasso library

    You need to add it to the project entry in the grad file:

    compile 'com.squareup.picasso:picasso:2.5.2' 

    It is very easy to use.

     Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView); 
    • Oh, savior! )) - Alexey

    Use libraries, Picasso or UniversalImageLoader , they will do everything for you

    • Well and Glide for completeness of the answer. - katso
    • @katso, I didn’t use this library, I don’t know, but I thank for the clarification - Werder

    Yes, please, you want the main thread, use)):

     StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); 

    Only sense to freeze the main stream, the application will not be usable.