I have read an much more documents on android and other blogs about how to support multiple screen sizes. And To some extent I am successful in making some good looking designs for apps. Now let me start from the start what is the problem and what I wanted to ask from you guys.
Android has now different screen sizes of different screen densities and having different resolutions. so We have to face 3 different things the size , density and the resolution.
Now Let take example of Samsung s4(xxhdpi device having 1080*1920px) , Samsung Grand (hdpi 480*800px) and both has same screen size that is 5 inch
and Samsung galaxy note 10.1 (Mdpi devices ) 10 inch screen size.
Now android says to make different drawable and put them into respective folder, its ok, let suppose its done. Now what ?
lets suppose , What if I have to set the image in left top with the marginleft of 5 dp and some other views according to them with different specific paddings and margins in dps and suppose I have set all of these in my layout according to hdpi device, which we know is not going to look good in samsung s4 xxhdpi device and tablet.
and Also as design pattern says to change design for the tablets according to your need , but on the other hand the support of making different layout has been deprecated now we have to use different values folder.
so in short what is a best way and what is clear thing for making drawables.
how should we re size our drawables to support all devices , and also if making different layout has been deprecated now what should we do to make our design look good and approximately same in all devices?
also how to judge that device is tablet and we should now start showing the multi pane design ?
please do not refer me to android developer website , I know its very helping and I learnt a lot from there , but right now I just want to discuss the technical issues and want to take advantage of some experienced developers. Thanks
Related
I have got an enhancement of one application. It is developed for 10.1 inch tablet. However it is working nice for tabs with size 10.1’ and for other screen sizes UI is poorly aligned. I need to do the changes in application so that it will be as good as 10.1 inch app for all other screen sizes(>4 inches).
I have few doubts here on my approaches.
1) I have found “size qualifiers” in android developer’s site. How many type of layouts need to use for each screen to make good for all sizes in android world.
Note: All screens in this application are always on land scape orientation. Is size qualifiers still works here?
2) Somewhere I found in “stack overflow “, It is already developed for 10.1 inches so that use percentages and change to every screen size.
100% -> 10.1’
? -> 7’
Which one is good and proper solution for maintenance also? Is there any other best solutions?
There is no hard and fast answer.
It is up to you to determine how many screen sizes you want to optimize for.
I'd suggest optimising for small, mid and large with layout qualifiers:
1) size qualifiers do work in landscape as they assess based on smallest screen width.
layout
layout-sw600dp
layout-sw800dp
2) I dont understand your question... i've never seen percentages used in Android layouts
There are so many different screen sizes that you can adapt your layout to..
In Eclipse's graphical layout you can also choose the screen size and resolution for which you want to develop (you can define the screen sizes and resolution and you will see how the layout looks on each of them).
You can also have several images that will be chosen automatically for each screen size via the drawable folder. You got drawable-hdpi for high density screens, drawable-xhdpi for extra high density screens and so on.. you can change an image to adapt to many of the screen size using Google's Android Asset Studio : http://romannurik.github.io/AndroidAssetStudio/index.html
You should also read the Android developers guide:
http://developer.android.com/training/multiscreen/screensizes.html
http://developer.android.com/guide/practices/screens_support.html
I am designing(PSD) an Application for Android OS, which will be developed by developer. I need to provide him the mockup of Design(PSD), Which we target to run on all android devices. I have searched for resolution to design, but the answer I have seen is really large number of resolutions.
Do I need to design Application for every device separately. or Is there any standard sizes I could design, So that I work on all devices?.
Can anyone explain here with the Resolution and PPI.
Well, you could design it for many screen sizes. Note that today most devices are widescreen. So the first step should design a 16:9 layout. You have to design it vertically and horizontally way.
So, at this point you should think about two layouts at first: Horizontal and vertical. You should now start to imagine the look of the app in both alignments. Second, you should note if the app will be for tablets, for smartphones or both. So, in case you have to design for both, then now you have to think in 4 layouts: Tablet horizontal, Tablet Vertical, Smartphone Horizontal, Smartphone Vertical.
Now? Take your Photoshop and start to design. You can download many Android PSD Templates for mocking up your layouts. Which resolutions to choose? Well, I'd go for 1200x675 for Smartphones and 1920x1080 for tablets.
Note that this is for having a reference for the developer. If he needs Pixel Perfect layouts then you should talk closely with him.
ldi:mdpi:hdpi:xhdpi :: 0.75x:1x:1.5x:2x
So make each of the drawables (png) with resolution in that ratio
I'm required to design an apps for android.
And after some reading, I find out android device are divided into few categories in term of resolution, like
small screen
normal screen
large screen
extra large screen
but in different density.
So lets say, now I need to come out a design for normal screen, what resolution that I should use for the "look & feel" of the apps UI.
From the reading, I know android apps are use dp instead of px. So, is it means I have to convert few specific screen size to dp before I start to design ?
Or I just simply target a common resolution for normal screen size like 320x480, provided I will have few set drawable in different density ?
Please correct me if I had mistaken it.
Thank you
Good question, so far we have 5 screen densities :
xxhdpi,xhdpi,hdpi,mdpi,ldpi , now if you have an image resource you will need to create 5 copies of it, its always recommended to start by the xxhdpi till you reach to the smallest,
however you can use online calculators that will calculate the PX and DP for all the densities, i recommend these two tools android developer toolbox and developers tools, and with developers tools you can test the colors, and how are they going to look like in the screen in HEX decimal.
Yes it is true android has following types of devices
LDPI
MDPI
HDPI
XHDPI
http://developer.android.com/guide/practices/screens_support.html
this link gives you all the description
and ya you have to create icons and images supporting to all the devices resolution wise.
There are various devices with various screen sizes.
Usually, they are mentioned as LDPI, MDPI, HDPI or XHDPI devices.
Although, in coding there are many things to be kept in mind so that you achieve a good uniform design in all your devices !
Refer to this link. It is always good to follow official sites, rather than other tutorials out there. Make a habit of using relativelayout !
Also in the link you can explore many things to get the knowledge of designing in Android.
I developed and application and uploaded all the images in the respective drawable folders (different pixels for different desnities).
Now I am confused when it comes to layout. If I used the layout editor with 4.1 inc (thats considered Med screen I guess?) everything looks great.
Now when I use the editor with 10.1 inch which is the tablet, then I see icons very small and the text is small. I have not run the emulator yet.
So I am wondering:
1- why would the text be small although I didn't specify text size? Shouldnt scalle appropriately? or should I give it a specific size for bigger layouts?
2- Why the icons are small given that I provided the different drawables? I thought it would scale up accordingly.
Please don't give me the supporting multiple screens link in android as an answer, as I already went through it and still no luck with above. I need your personal advice as I think I am missing something here
Thank you so much in advance
Android support for different screens is a little tricky. That's because you can have large, small, medium and xlarge screens, plus high, medium and low density ones. There are a dozen possibilities (xlarge low density, small high density) and not a single resolution is defined. So you must know the principles which the API is designed upon and must define your layout thinking about the role the widget has inside your UI. You also must bear in mind that your layout won't be pixel perfect on 100% of devices, so your aim should be being usable on all possible devices.
In your specific case it seems that either you don't manage to specify the correct resources, or the system doesn't pick up the right ones for you, but I must remark that it doesn't make sense on Android to talk about big, small and scale: you should design your layout with a (good) webdeveloper mindset, who daily deals with tons of different displays, resolutions, physical sizes and even devices.
I also suggest not using the graphical builder if you are new to Android, because you really need to know how Android lays out components, otherwise you will come back to SO very often :)
If you do not specify the text size in your layout file Android will take the default value, which is most likely in DIP (density independent pixel) therefore it will be the same physical size on any devices. That should explain why the text looks so small on your 10 inch tablet.
What I would do in this case is have 3 layouts for each activities and specify the text size for larger devices (given you already like the look on phones) and put them in this folder scheme :
res/layout/layout.xml // phones
res/layout-sw600dp/layout.xml // 7” tablets
res/layout-sw720dp/layout.xml // 10” tablets
Information above was taken in this article. I have this applied in my current personal project and so far it works like a charm.
Secondly, as far as icons go, I'm no drawable expert but if you provided the same file in each folder (like I think you did from what I understand in your question), it will not make it scale. You'll have to create 4 difference icons, one for each possible pixel density.
Information about icon sizes can be found on this page.
Hope this is of some help to you.
My experience with the Android device zoo drew me to the sad conclusion that the built-in screen size/layout facility is useless. Cases in point, straight from support:
a 10 inch tablet with Android 2.2. Screen size xlarge is not supported by Android 2.2
Kindle Fire, which is 7 inch and claims it's xlarge.
I ended up putting all three layouts (med/large/xlarge) into layout, loading one based on run-time density and resolution, and providing an option for user to force a specific layout.
Just sayin'.
I start developing a new Android application from scratch these days.
The company I work for has its own designer.
The designer asked me for the sizes of screens she should design for and I didn't know what to tell her - I want to support all the Android based smartphones with all the different densities and screen sizes.
I'm familiar with this doc about supprting multiple screens.
Question #1:
So, can I assume that all the smartphones are "normal" screen size, and look at "Table 3" at the bottom of link I've added, at the "Normal screens" row and tell the designer that I need 4 versions of each page, as listed in this row: WQVGA400 (240x400), HVGA (320x480), WVGA800 (480x800) , 640x960 ?
Will these resolutions cover all the Android based smartphones?
Question #2:
While working on the project, the designer might tell me:"the title bar should be 40px long in the 240x400 screen", how can I translate these pixels into dip's? How can I achieve easy daily work when it comes to working with the designer? Should I just develop first only for mdpi, on 320x480 screen where 1 pixel = 1 dip and then no translation is needed?
Thanks in advance!
The new Android Design Guide should give you all information you need.
The transformation between dip and px is based on the type of dpi you have and not on the screen size. Define your own title bar to make sure, that the height is the specified one.
No You should say designer that it's most common values, but not all possible. So, try to get design with comments "1/5 of phone screen and 1/10 for tablet screen" not "40px". Other possible way - to create design for only resolution, and then stretch it to other screens.
This question gives good answer
The answer for the question 1 is no. For instance, Galaxy Nexus has a resolution 1280x720, Droid Razr 960×540.
ANSWER #1: No
ANSWER #2: Have a look at this link to understand a bit more about dip.
I think the iPhone way of doing things doesn't quite work on Android (Limited iPhone experience here but you pretty much have set graphics for everything right?) on Android the designer will probably have to get familiar with the layout system or somebody else would need to take a reference design and translate it into a layout file.