Skip to content Skip to sidebar Skip to footer

Load Images For Different Screen Sizes From The Server Using Picasso?

Hello i am making an android app in which i am getting images from the server and for that i am using picasso library now my question is that as there are different densities of sc

Solution 1:

Picasso won't know which image to download but check out Picasso.fit() which per the doc will Attempt to resize the image to fit exactly into the target {@link ImageView}'s bounds

Solution 2:

ninepatch used for system elements images rather than pictures. You have not specified the image is part of the interface or content.

You can get the density of the screen and the resolution of software and stretch / compress the image. (I would in your place was not afraid of distortion and memory problems in the low devices) So what can you do multiple sets of graphics on the server, if so worried.

But most of all, you really will approach the solution of this response.

But it's weird, to be honest. We need more information. I normally use drawable-XXX, ninepatch for buttons (backgound panels...), and stretch / compresson RapidDecoder for content.

Post a Comment for "Load Images For Different Screen Sizes From The Server Using Picasso?"