Question

I'm using Picasso, and I need to have a background (fixed) on also ImageView and an image from an URL. (android:background and android:src on XML)

However it seems that whenever I set a URL to be downloaded onto my imageview using picasso, my background is lost.

Was it helpful?

Solution

Yes you can, Picasso only sets the image on the 'src', not the background..what might be happening is that your downloaded image is taking up all the space and you're not seeing the background. To quickly check if this is the case, try adding a android:padding="20dp" to the ImageView and you will see if this is the case.

In this case, you will ensure that you will always see the background behind, at least part of it..so it will help you debugging your case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top