Downloading multiples images from Picasso in Android

前端 未结 6 1927
被撕碎了的回忆
被撕碎了的回忆 2021-02-09 14:59

I\'m using Picasso library to download images from URL. This is my first attempt on Picasso

Scenario : I want to download some images from server and store them into a

6条回答
  •  梦如初夏
    2021-02-09 15:28

    This is perfect answer and I've tested it and works like a charm. You need to use a dedicated thread to retrieve multiple images from network.

    private class loadImg extends AsyncTask {
    
            @Override
            protected Void doInBackground(Void... params) {
                try {
                    for(int i=0;i

    Call your AsyncTask any where in the Main thread.

    new loadImg().execute;
    

提交回复
热议问题