I want set an image to my ImageView created dynamically in my android app. I simply create it :
ImageView image = new ImageView(this);
and I want to set an image from a link like
What have I to do ?
EDIT: my code:
LayoutInflater vi = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                View v = vi.inflate(R.layout.article, null);
                img = (ImageView) v.findViewById(R.id.grid_image);
                url=thumbnail;
                Picasso.with(MainActivity.this).load(url).into(img);
It is in a for cicle

 
     
     
     
    