Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design Layout For Multiple Screens

Tags:

I am new in android, and want to design the layout which run in all screens of the android phone and tablet too ? Is their is a way to do this ?

like image 425
Puneet goel Avatar asked Dec 08 '11 08:12

Puneet goel


People also ask

What is split screen web design?

What is a split-screen layout? In website design, a split-screen layout is an interface layout that has divided the home page or landing page of the website into two or more vertical parts. With this design, designers can separately present diverse content or messages on the same page.

What is the good screen design and layout?

Good screen design considers users' eye movements and provides clarity with simple symmetries. An incoherent alignment of different sections, texts, and images can be overwhelming. There should be a comfortable distance both towards the screen edge and between different sections of the screen.

What are the basic principles in screen design and layout?

Understanding the basics The elements, or principles, of visual design include Contrast, Balance, Emphasis, Movement, White Space, Proportion, Hierarchy, Repetition, Rhythm, Pattern, Unity, and Variety.


3 Answers

You need to create different layout for diff screen size. Support all screen you need to create following layout:

  1. Low density Small screens QVGA 240x320 (120dpi):

    layout-small-ldpi (240x320)  
    layout-small-land-ldpi (320x240)
    
  2. Low density Normal screens WVGA400 240x400 (x432) (120dpi):

    layout-ldpi  (240 x 400 )
    layout-land-ldpi  (400 x 240 )
    
  3. Medium density Normal screens HVGA 320x480 (160dpi):

    layout-mdpi (320 x 480 )
    layout-land-mdpi (480 x 320 )
    
  4. Medium density Large screens HVGA 320x480 (160dpi):

    layout-large-mdpi (320 x 480 )
    layout-large-land-mdpi (480 x 320)
    
  5. Galaxy Tab ( 240 dpi ):

    layout-large  (600 x 1024) 
    layout-large-land  (1024 x 600)
    
  6. High density Normal screens WVGA800 480x800 (x854) (240 dpi):

    layout-hdpi (480 x 800)
    layout-land-hdpi (800 x 480)
    
  7. Xoom (medium density large but 1280x800 res) (160 dpi):

    layout-xlarge (800 x 1280)
    layout-xlarge-land (1280 x 800)
    

Also add following code in .manifest file:

<supports-screens                                 
    android:smallScreens="true"                    
    android:normalScreens="true"         
    android:largeScreens="true"            
    android:xlargeScreens="true"             
    android:anyDensity="true" />
like image 194
Dhaval Khant Avatar answered Sep 29 '22 03:09

Dhaval Khant


<supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true" />

You should probably read this:

like image 7
Padma Kumar Avatar answered Sep 29 '22 03:09

Padma Kumar


In addition to the traditional supports-screens parameters refer to the new Size Qualifiers launched in 3.2

Using new size qualifiers

The different resource configurations that you can specify based on the space available for your layout are summarized in table 2. These new qualifiers offer you more control over the specific screen sizes your application supports, compared to the traditional screen size groups (small, normal, large, and xlarge).

Table 2 enter image description here

To help you target some of your designs for different types of devices, here are some numbers for typical screen widths:

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).

Using the size qualifiers from table 2, your application can switch between your different layout resources for handsets and tablets using any number you want for width and/or height. For example, if 600dp is the smallest available width supported by your tablet layout, you can provide these two sets of layouts:

res/layout/main_activity.xml           # For handsets
res/layout-sw600dp/main_activity.xml   # For tablets
<manifest ... >
    <supports-screens android:requiresSmallestWidthDp="600" />
    ...
</manifest>
like image 6
Rajdeep Dua Avatar answered Oct 01 '22 03:10

Rajdeep Dua