http://stackoverflow.com/questions/12242111/application-skeleton-to-support-multiple-screen
74
86
|
As we know Android coming with various device which having different Features, Resolution and Screen-size so while developing an Application which support multiple(small and big) screen there is an obstacle of size and layout.
This leads to different combinations of screen sizes, resolutions and DPIs and creates quite a challenge when designing and developing for Android devices. While some other Manufacturer(non Android) have different resolutions and DPI, they share the same screen size and the resolutions follow the same aspect ratio. Therefore, an image can be created to fit the non Android devices.
My question is that is there a proper flow or architecture that one should follow to meet the requirement?
Remember we do have Tablets of different Size and Resolution.
I'm aware that Android Developer contains this information but my view is from implementation.
From my knowledge what I understood is that for designing Android graphics even Programmer must know the designing concept.
| |||
117
|
Finally created a structure which handle layouts and icon for multiple screen.
Android generalises device displays into categories based on two parameters:
To determine screen size & density quickly, please install "What's my Size" app for Android.
Screen size
Android defines four generalised screen sizes:
Android defines four generalised screen densities:
Typically:
It is listed here the percentage difference of device screen
But as we know now most of device coming with 480X800 so I'm consider this as based device, so our new calculation will like this
which means that first icon and design will be created for 480X800 only and then for rest ones(i.e. Ldpi, Mdpi, Xhdpi).
There are images which are common for all layout and must uniform in color and shape(no complex shape, no curve) so for this kind of image we are creating
9patch which to be put in “drawable(no-suffix)” folder. To create 9Patch image you can either use DrawNinePatch orBetterNinePatch
Now just rename your images based on Android's standards and complete your application with
hdpi and then just take drawable-hdpi folder and Open Adode Photoshop(recommended) create Action of multiple size(just change the size according to percentage ratio) once Action created for all size then just do Batch Automate and give source(drawable-hdpi) and destination(drawable-ldpi, drawable-mdpi, drawable-xdpi).
The reason I insist you to use Photoshop because it will resize automatically your image with Actions and one more plus point is that you need not to rename the file(it will assign same name as original one).
once you completed with creation of all images, refresh your project and test it.
Sometimes there may be possibility that the layout which support screen(xhdpi, hdpi, mdpi) may be get cut in small screen(ldpi) so for handling this just create separate Layout folder(layout-small) for it and add
ScrollView (mostly). Thats it.
Tablet Tablets are categorized into two size.
In this we need to create image for both the screen and just put them accordingly
So all in all we will have this folder in our application to support multiple screen.
will be more qualifier combination with
Screen size and Screen density
more qualifier with
Screen density and Version
and more qualifier with
Screen size and Version
and more qualifier with
Smallest width concept(SW)
Further more in Android V3.0 Honeycomb they introduced new concept of
SW(smallest width) in which device are categorized into screen width, so if we are creating a folder named drawable-sw360dp then the device with 720dp(either width or height) will use resource from the this folder.
for example to find the
Samsung Galaxy S3 dp to suffix to drawable-sw?dpWith reference of DP Calculation, If you want to support your layout or drawable to S3 then the calculation says
px= Device's width = 720
dpi= Device's density= 320
formula given
interchanging formula because we have px's value
now putting value,
so
drawable-sw360dp will do the job
Get you Device configuaration from GsmArena Sameway you can also create folder according to Device's Android API version i.e. drawable-hdpi-v11` so the device which is having API11 and it is Hdpi then it will use this resources.
Additional Tips:
Here is the Data collected during a 7-day period ending on October 1, 2012. To see the latest statistic about Android platform version, go to here
Based on Screen Size
Based on Screen Density
| ||||||||||||||||||||
|
MicroMax Funbook
gsmarena.com/micromax_funbook_p300-4701.php7", 480X800, Ldpi (133 dpi)
can you tell me in which category(drawble-large or Ldpi or if Android v3.0 sw-480) it will fall? – hotveryspicy Sep 3 '12 at 6:55