I'm trying to create a splash screen on photoshop that will support every single device that runs Android. I've been reading around blogs and the android website and I see that you need to design your assets in dp, but I don't understand what that means. I understand the concept of dp, but I don't understand how to apply that on photoshop. I know the equivalent of a dp is pixels/(dpi/160), but I'm not sure what size (pixels) I should be using for each one of the different sizes (ldpi, mdpi, hdpi, xdpi, xxdpi...). So if someone can let me know what the dimensions of my splash screens needs to be, as well as the resolution, I'd really appreciate it.
ldpi = 320 x 426
mdpi = 320 X 470
hdpi = 480 x 640
xhdpi = 720 x 960
xxhdpi = 1080 X 1440
strongly recommend that images are no larger than 2,000 pixels wide with no more than 72 dots per inch (dpi). This keeps your Splash page loading quickly.
Related
I Need to create a Designs for a Andriod Application.
I can see everyone are speaking about this "ldpi,mdpi,hdpi & xhdpi....etc.," My biggest doubt is in WHAT RESOLUTIONS, I should create the designs in Photoshop?? As there are lots of screen sizes available now. WHAT DEFAULT SCREEN SIZES I SHOULD DESIGN WITH FOR EACH "ldpi,mdpi,hdpi & xhdpi ?" Like for Xhdpi - What Screen resolution Should I do ?
a. 720x1280 - 320 dpi
b. 2048x1536 - 320 dpi
c. 2560x1536 - 320 dpi
d. 2560x1600 - 320 dpi
Again the same resolutions for ldpi,mdpi and hdpi ? What Screen Resolutions for the respective DPI's
Which Screen Resolutions for
a. 120 dpi ?
b. 160 dpi ?
c. 240 dpi ?
PLEASE CLARIFY ME GUYS.
THANKS A TON IN ADVANCE
See this calculator.
ldpi is 120 dpi
mdpi is 160 dpi
hdpi is 240 dpi
xhdpi is 320 dpi
xxhdpi is 480 dpi
xxxhdpi is 640 dpi
(Thanks to Tobor for adding those last two and correcting my typo, I accidentally overwrote his edit)
Also, I don't know why Maneti's initial advice was downvoted. When in doubt, use this tool (or the one in your android sdk) to generate your icons, then import those icons you generated into Photoshop. That's actually the most pragmatic and easiest solution (that doesn't require any thinking on your part and yet that solution works all the time for densities).
As to the size of an image (as defined by the Android guidelines/terminology), only worry about the size of that image if it's a image that could potentially take the entire width, or the entire height, of the screen (like a large background image for instance).
So in most cases, most developers end up not needing the size qualifier for their drawables (because it won't make a difference unless it's a large background image).
For 120, 160, 240 dpi, respectively, I'm condidering 240*320, 320*480 and 480*800 (or 854) screen sizes.
For xhdpi (320) I'm considering 1280*720 (or 800).
But this is only a reference
Take in account that your design should scale
So, the graphical elements should stretch or be repositioned well.
After all, the screen size is not so important, if you project your objects positions and sizes well.
Use dp for objects and sp for font sizes, use the proper dpi resolutions for graphics and you shold be fine.
You can't follow any existing resolution. Generalize.
You could start with with XXHDPI and then export your assets from there. I found that 1080px x 1920px and 72ppi is a comfortable size to design in Photoshop and allows you to export to other resolutions by downscaling (you should avoid scaling assets up). You can then you use this Photoshop script I wrote or Cut&Slice me to export assets from that document to the other resolutions (XHDPI, HDPI, MDPI, and LDPI).
I would also recommend using a Sprite Sheet PSD for your assets to keep things clean and organized.
Hope this helps.
first I think you meant ppi not dpi.
second since the graphics are intended to be used on screen only the size in pixels matters. The ppi could be what ever you want.
ppi (pixels per inch)/dpi (dots per inch) is used to measure the resolution of the output in the real world.
So why people use ppi if it doesn't matter?
Some people like to use the ppi when sizing the files for proportions. This way you can change the ppi number and get the proportions right.
let's assume you start with xxhdpi with a ppi of 480.
Then if you change to 320 you will get xhdpi
240 > hdpi
160 > mdpi
120 > ldpi
but you can use percentages as well.
So I get the whole Android pixel independency thing.
I'm creating a SplashScreen that is using a 9patch that will stretch its edges to account for all screensizes.
I also use a differenlty sized 9patch image in ldpi mpdi hdpi xhdpi for each splash screen as well.
That way the logo (the non stretched area of the 9patch) will be the correct size.
I know mdpi is 1.0 and hdpi x1.5 in relative size and xhdpi is x2, but when I'm creating that first mdpi image how do I know how many pixels wide/high it should be?
Hope that makes sense.
Really there's no one answer. Firstly though, I wouldn't start at mdpi and scale up -- It's best to start at the highest quality that you can. Vector, if it fits the design, or a high resolution image (even larger than the largest screen size you currently plan to support). Then, from there, just downsize for the device that you plan to test. For example, a typical HDPI resolution would be 480 x 800, so fit it appropriately there. An XHDPI resolution might be something like 1280 x 720. It's best to just leave a good amount of margin on the edges in case it's used on a device with a different aspect ratio, or something. But yeah, basically, design as large as you can, and then just export based on some average screen resolutions for the density bucket you're working on.
(...) when I'm creating that first mdpi image how do I know how many pixels
wide/high it should be?
Since mdpi is the baseline for all other density buckets, 1dp on an mdpi device will translate to exactly 1px. In other words, use an mdpi device to figure out the relative size on the screen and from there on apply the given scaling ratios to produce resources for the ldpi, hdpi and xhdpi buckets. Obviously you do not actually have to scale up that mdpi resource - all you need determine is the size for that screen density and then you can use whatever source file to produce images for all buckets.
The link xBroak has given, is actually the best source of information regarding your question. A quote from there to support above statements:
The density-independent pixel is equivalent to one physical pixel on a
160 dpi screen, which is the baseline density assumed by the system
for a "medium" density screen.
It may also come in handy to be aware of the simple d(i)p to px formula (also from that same link):
The conversion of dp units to screen pixels is simple: px = dp * (dpi
/ 160)
With this information, you can easily verify that 1dp on an mdpi device (with 160dpi screen) is equal to 1px. Just fill in 160dpi and you get px = dp * (160 / 160), which simplifies to px = dp * 1, and hence px = dp for 160dpi. QED. :)
These are your basic guidelines:
xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
480dp: a tweener tablet like the Streak (480x800 mdpi).
600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).
More info: http://developer.android.com/guide/practices/screens_support.html
I have two android devices with the same screen resolutions (800x480) and dimensions.
The difference is that one screen is low density (120 dpi) and the other normal density (160 dpi).
I don't understand the reason by the same image of 200x200pixels is smaller in the screen with less density and if i write a rectangle of 200x200 pixels is the same on both screens.
Can anybody explain me the reason?
Thanks in advance
A 90 pixel image at ldpi becomes a 120 px a mdpi, a 180 at hdpi and a 240 ad xhdpi.
You can find more informations about it here (search "Screen pixel density") : Dev Android Ressources
Another good link about Density : Screen Support - Density
I'm new to developing Android games and I still don't have an idea as to how I can make the screen size for my game dynamic. Is this possible? Or do I really target a specific screen resolution? For example, if I have a 150 x 150 drawable in a 320 x 480 resolution, that would make the drawable large but what if the game is installed on a 1024 x 768 resolution? Any suggestions with this? Thanks in advance.
Android has several folders for different resolutions: ldpi, mdpi, hdpi, and, when using API-level 10 or higher, xhdpi.
The 320 x 480 resolution will use the mdpi folder, every step higher uses a factor of 1.5. So when your drawable is 150 x 150 in mdpi, you should make the drawable (150*1.5) x (150*1.5) = 225 x 225 for the hdpi folder.
You may also want to take a look at this.
I have an android app that I'm trying to add support for different densities, screen sizes, etc. I've developed the app on the simulator with the HVGA support and used all icons from our iphone app which turns out nice since the resolution was at 320x480. Everything looks good now but I'm a bit confused after reading the official android documentation. For layouts I'm going through and ensuring everything is in dp units but when it comes to the images I'm lost. I know that mdpi is 160 but what do I tell my designer for what the hdpi image needs to be? Do we need to increase the height and width and the dpi? Or is it simply enough to leave the dpi as is and increase the height width? For example, if I have an image that's 100 x 100 with 160 dpi, in order to render it identical on an hdpi screen it should now be 150 x 150 with 240 dpi? Assuming if I leave the dpi at 160 it will just be a little blurred? Sorry about silly question but I just want to make sure I'm doing everything right and I'm really a C developer with no graphics experience at all.... No excuse at all but could use some help. I saw some examples where the splash screen for mdpi was 320x480 at 160 dpi but then the hdpi splash screen was at 480 x 800 at 240. Obviously 480 x 1.5 does not equal 800. Furthermore, after looking at the icons in the android sdk, they only scale up the width and height, not the dpi. Probably because they're icons and don't need to be? Lost in photoshop land....
For me as a Graphic Artist of a Mobile Development Company, I made UI's for Android in this dimension:
HDPI : 640px x 960px in 300dpi optimized by 75%
MDPI : 640px x 960px in 300dpi optimized by 50%
LDPI : 640px x 960px in 300dpi optimized by 25%
Take a look at Providing Resources.
There is a section there on "Screen pixel density (dpi)". You are correct that you just scale your width and height for the resources. A 90 pixel image at ldpi becomes a 120 px a mdpi, a 180 at hdpi and a 240 ad xhdpi.
You are also right that the 800 isn't 1.5 x the base 480 height. The reason for that is that these are all approximates based on targets for each density. The phone os lies to the applications running on it about its actual height and width and scales the resources to match the exact dimensions of the handset, since it can vary. This is my understanding.
I recently solved this problem by generating many PNGs of different sizes from a SVG vector image. These are the ratios I used for screen pixel densities and screen sizes:
ldpi:mdpi:hdpi:xhdpi:xxhdpi <-> 3:4:6:8:12
sw320dp:sw360dp:sw480d:sw600dp:sw720dp <-> 8:9:12:15:18
Putting these two together can give a 5 by 5 table of image size ratios that you need in make your image resources look great on most Android devices' screens. Of course, the downside is that many images will be generated, and the size of your APK will grow.
Please see http://aleakymemory.blogspot.com/2013/11/a-different-look-at-managing-android.html for the table of image size ratios.
Everything looks good now but I'm a bit confused after reading the official android documentation.
Which documentation did you read? Here are some to be going on with:
Supporting Multiple Screens
Icon Design