I found this tutorial"How to load an ImageView by URL in Android", which works fine for me, but in my case I don't want to just set a few images but a list of then, I have a Api RestFull which returns some strings and the Image URL, as I saw in that tutorial it uses a AsyncTask to download the image and set inside of ImageView, In my case I already using a AsyncTask to retrieve from my API, do I need to put something inside of my ModelClass to automatically download?
This is what I have...
public void getAdsUser(final Activity context){
    new AsyncTask<Void, Void, String>() {
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
        }
        @Override
        protected String doInBackground(Void... voids) {
            try {
                Response = new WebBase().getUserAds(context);
                if(Response.equals("NODATA")){
                    return "NODATA";
                }
                if (Response.equals("EMPTY")){
                    return "EMPTY";
                }
                if (Response.isEmpty()){
                    return "ERROR";
                }
                else {
                    return "OK";
                }
            } catch (IOException e) {
                e.printStackTrace();
                return "ERROR";
            }
        }
        @Override
        protected void onPostExecute(String s) {
            super.onPostExecute(s);
            switch (s){
                case "NODATA":
                    GenericAlertDialog.MakeDialog(UserAds.this,R.string.NODATA);
                    break;
                case "ERROR":
                    GenericAlertDialog.MakeDialog(UserAds.this,R.string.Error_Internet);
                    break;
                case "EMPTY":
                    isVisible_ads.setVisibility(View.VISIBLE);
                    break;
                case "OK":
                    UserModelView[] modelArray = new Gson().fromJson(Response,UserModelView[].class);
                    List<UserModelView> userModelView = new ArrayList<>(Arrays.asList(modelArray));
                    adapterUserView.add(userModelView);
                    recyclerView.setAdapter(adapterUserView);
                    break;
            }
        }
    }.execute();
}
Thanks!
 
     
     
    