Dinesh Rawat
Dinesh Rawat

Reputation: 3

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.

Upvotes: 0

Views: 1532

Answers (2)

Lior
Lior

Reputation: 842

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?

Upvotes: 0

Amir Ziarati
Amir Ziarati

Reputation: 15107

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.

Upvotes: 2

Related Questions