简体   繁体   中英

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

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..

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 :

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM