Search code examples
javaandroidimageuiimageasset

How to add dpi responsive images to android studio?


I am new to the android development environment. I want to add an image into my application but with different dpi. If I go to drawable > new > Image Asset I can only add an icon for my app/menu button/notification icon. If I select the launcher icon, my image becomes way too small. If I click the menu bar menu, it becomes white. If I click notification, they're as tiny as an ant. Anyways, I was wondering if I can make android studio make the image responsive by adding differing dpis. like splash.png HDPI splash.png MDPI See what I mean? I made a splashscreen but on different devices it's either too small/too big.

Note: PARDON ME IF THIS HAS BEEN ASKED BEFORE. I AM KINDA NEW


Solution

  • in your res folder there multiple folders for drawables drawable-mdpi drawable-hdpi drawable-xhdpi ...

    if you want to add an image for hdpi devices add it into drawable-hdpi