How to make layout for multi-screen android

In This Blog,
I have talk about some basic points for support the layout for multiple screens and konw the method for create it. Because Android runs on a family of devices that allow various screen sizes and densities.

 

Some important points

We should know some important things before make multi screen layout.

 

Screen size: Actual physical size, measured as the screen’s diagonal.

four generalized sizes: small, normal, large, and extra-large.

Screen density: The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch).

Six generalized densities: low, medium, high, extra-high, extra-extra-high, and extra-extra-extra-high.

Orientation: The orientation of the screen from the user’s point of view. This is either landscape or portrait.

Resolution: The total number of physical pixels on a screen.

Density-independent pixel (dp)A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way.

 

A set of six generalized densities:

If you create design your UI for different screen sizes, you’ll find that each design requires a minimum amount of memory space.

 

So, each generalized screen size above has an associated minimum resolution that’s defined by the system.

These minimum sizes are in “dp” units—the same units you should use when defining your layouts—which allows the system to avoid worrying about changes in screen density.

 

How to Support Multiple Screen

 

If you want to create layout for handset then you have to create activity in normal layout folder

And if you want to create the layout for the For 7” tables then create your activity in the layout-sw600dp  folder and use the drawable-sw600dp.  

if you want to create the layout for For 10” tables then create your activity in the layout-sw720dp  folder and use the drawable-sw720dp.  

Note: sw means “smallest width”. It doesn’t change if the device is rotated.


If you want to change the layout when the screen orientation has changed then use Available width – w<N>dp.

If you are using “available width” qualifier, w<N>dp then one device may actually use both layouts, depending on the current orientation of the screen.

Note: layout-w600dp uses Multi-pane. 

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close