I have put image as background of button. but I don't know at what size of images should I create in Photoshop for all three folders drawable-hdpi,drawable-ldpi, and drawable-mdpi?
Thank you.
I have put image as background of button. but I don't know at what size of images should I create in Photoshop for all three folders drawable-hdpi,drawable-ldpi, and drawable-mdpi?
Thank you.
If your buttom image is Plain-colored background and if it can be a Stretchable image then Create a bitmap using
9-Patch
Tool.Otherwise, read about
Alternate Drawables
section on Android developer site:I think this can help you, is a conversion tool, adding image size (mdpi), it gives me the result in pixels for each screen sizes.
http://labs.rampinteractive.co.uk/android_dp_px_calculator/
Hope it helps!
An additional tip for making your life a little simpler in creating images for photoshop. Create your image in mdpi, ie at 160 dpi. This is so because Android calculates pixels as such
So basically if u wanna make a button image of the size 48x48, create an image with that size and set the dpi to 160. Once you are done, just change the dpi to 120, 240 and 320 and save your images.
You will not have to waste time calculating what the image sizes should be for different densities.