Reputation: 8841
As stated in this official android document, we need to create diffent icon for different display size, for example:
res/drawable-mdpi/my_icon.png // bitmap for medium-density
res/drawable-hdpi/my_icon.png // bitmap for high-density
res/drawable-xhdpi/my_icon.png // bitmap for extra-high-density
res/drawable-xxhdpi/my_icon.png // bitmap for extra-extra-high-density
It's really tedious so I wish to create one version xml icon (vector asset by android studio), since xml is vector image, it should be good to scale to different screen size.
How can we use the same version xml icon to support different screen size? should I copy it to different directory just like different dimension png files? Or just keep one copy in drawable directory then everything will works fine?
Upvotes: 0
Views: 340
Reputation: 54194
Just put one copy of the vector XML file in res/drawable
and the system will take care of the rest for you.
Upvotes: 1