A Guide to the Best Dispensaries That Ship to Kentucky

Are you trying to uncover the top dispensaries in Kentucky that ship? It’s simple to identify shops that will transport cannabis goods to you, whether you want them for medical or recreational…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to add vector image in android Studio ?

Hey guys!

Using vector image in your app instead of a bitmap image can be really efficient and effective. There are many pros of using a vector image over bitmap image. Like it can avoid blurring or distorting of image when resized. And it also helps reducing the overall size of app as you don’t need to store multiple images of different size and resolution for different screen resolutions.

So what actually is a Vector image?

According to definition:

But in layman language, Unlike Bitmap images which are made up of small pixels, Vector images are not made up of pixels. So since there’re no pixels in Vector images, it does not distort when resized.

How to add Vector Image in Android Studio?

Android Studio provides us feature to include vector images in our app through Vector Asset Studio You can add Vector Image in your app through following steps:

Now use the XML file generated as simple drawable image.

PS: You can change vector’s colour by simply going in XML file generated and changing RBG value.

Thanks 😉

Add a comment

Related posts:

Building Serverless Microservices on AWS

Microservices has been a key trend in software architecture. Let’s discuss what microservices are and what is Microservices Architecture. The idea of microservices architecture is to take a large…

When It Comes To Social Support

Often times we go through our days feeling defeated as we continuously get let down by people around us. People we had assumed for a long time, were our “best friends.” We put so much of our faith…

We are understanding motivation all wrong

Recently I came across a TED talk given by the career analyst Dan Pink, in which he talked about how motivation and incentives work. I’m going to try to pass on my recently acquired knowledge…