0

How can we design the layouts for both devices and tabltes of all resolutions please advice on this.. thankyou

antoniom
  • 3,143
  • 1
  • 37
  • 53
user1285293
  • 108
  • 1
  • 9

1 Answers1

0

Please first refer this: Supporting Multiple Screen

If you got trouble then tell us where you got trouble.

Enjoy. :)

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

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

layout-small-ldpi (240x320)  
layout-small-land-ldpi (320x240)

Low density Normal screens WVGA400 240x400 (x432) (120dpi):

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

layout-mdpi (320 x 480 )
layout-land-mdpi (480 x 320 )

Medium density Large screens HVGA 320x480 (160dpi):

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

layout-large  (600 x 1024) 
layout-large-land  (1024 x 600)

High density Normal screens WVGA800 480x800 (x854) (240 dpi):

layout-hdpi (480 x 800)
layout-land-hdpi (800 x 480)

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" />
Shreyash Mahajan
  • 23,386
  • 35
  • 116
  • 188
  • Hi Thanks for your reply i have tried what you have suggested me and the problem is that there mention the mdpi resources will affect on 1280 x 800 resoultion tabltes so these are not fitting properly how can i resolve this..Thanks in Advance – user1285293 Apr 24 '12 at 09:53
  • @user1285293: Yes, You have to either put the Respective images to the drawable or make such layout xml file. – Shreyash Mahajan Apr 24 '12 at 11:14
  • Thanks for reply,the size 1280x800 will goes under which layout either layot-xlarge? i have tried like this also layout-sw600dp,layout-sw720dp in these 2 layout 1280 x 800 should take from layout-sw720dp correct ? please help me on this, if you have any example please share.. Thanks in Advance. – user1285293 Apr 24 '12 at 11:21
  • I have tried whatever have mention above same layouts but it is taking layout from mdpi like for 320x480 the resources also taking from same res/drawable/mdpi folder ?what might be the wrong am doing and i have mentioned all support screens true in manifest file and i have res folder structure like this ldpi,mdpi,hdpi and xhdpi – user1285293 Apr 24 '12 at 11:54
  • OK Try with my just updated answer and tell me if any issue you got ? – Shreyash Mahajan Apr 24 '12 at 11:56
  • Hi I have tried with the layouts what you mentoined above but still same ,bcoz the xoom tab is belongs to 160dpi that's why its taking resources and layout considering from mdpi layout as well as mdpi resource folder correct ? is there any other solution to get fit to particularly for extra high resolutions like xoom ? – user1285293 Apr 24 '12 at 12:15
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/10431/discussion-between-idroid-explorer-and-user1285293) – Shreyash Mahajan Apr 24 '12 at 13:00