how to dynamically load the images with different sizes in view pager android

545 views Asked by At

I am implementing user wall like facebook but i want to display image as with original size. And I am using view pager to display images. So how to display images according to screen size? Thanks in advance..

1

There are 1 answers

2
An SO User On

You need to use one of the scale types provided with ImageView class. How do you handle if the image is way larger than the screen, say taken from a DSLR at 3000x3000 resolution? What happens if the image is too small?

Have a look at the documentation for ImageView.ScaleType:

enter image description here