简体   繁体   中英

how to use vector images for different android screen sizes

how to use vector images which scale up and down according to the screen sizes? I m using a vector image in my project but it is not scaling in big screens.

what you mean by being scaled ? maybe you are misunderstanding.

if you mean the image size would be changed in various screen sizes such thing wont happen. the image size is what you provide in your imageview (or any otherview using the image).

the only different between vector assets and normal asset is that vector asset are redrawn every time so you wont have a low quality image no matter how big it is and which device it is being shown in. so you wont need to save various size of image for various size of screens.

if you want to change the size of image just change the imageView height and width. you can use dp (density independant) unit.

you dont have to do anything for support vector images for diffrent screens its already scale for the relevant dp, Can you give more details about your problem when you say "it is not scaling in big screens?" maybe you want the image on tablets will be bigger?

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