-1

How to Solve Screen Resolution Problem?

I want my application run on any android device, and its layout should not change,

I read android Blog of Supporting Multiple Screens,But do not get enough idea.

I have created different layout folder like layout-small,layout-normal,layout-large,layout-xlarge and created different XML files for all folder.

But when i run on Tablet it takes Default normal size XML file,I don't know why?

Please help me to solve it, Thanks in advance and Waiting for response

radhika
  • 9
  • 1

3 Answers3

0

According to this page the layout-small,layout-normal,layout-large,layout-xlarge are deprecated and you will use the

36x36 for low-density
48x48 for medium-density
72x72 for high-density
96x96 for extra high-density

as alernative, however for further information please check my answer here

Community
  • 1
  • 1
mmoghrabi
  • 1,233
  • 1
  • 14
  • 23
0

Create the layout and drawable with following qualifiers

layout-sw600dp drawable-sw600dp

which means tablet screen with minimum of 600dp and higher can use this layout and drawable.

So for standard configuration qualifiers for screen size you can create following configuration:

1)layout-sw480dp drawable-sw480dp

2)layout-sw600dp drawable-sw600dp

3)layout-sw720dp drawable-sw720dp

check http://android-developers.blogspot.in/2011_07_01_archive.html

Jainendra
  • 24,713
  • 30
  • 122
  • 169
0

Following the guide will only help you to deal the problem for the most cases, but never all the scenarios. Check the following list which is the Google's AOSP homescreen source code. Even this cannot guarantee it will work for all the devices. So yours are far from enough.

drawable
drawable-hdpi
drawable-land-hdpi
drawable-land-mdpi
drawable-land-xhdpi
drawable-mdpi
drawable-nodpi
drawable-sw600dp-hdpi
drawable-sw600dp-land-hdpi
drawable-sw600dp-land-mdpi
drawable-sw600dp-mdpi
drawable-sw600dp-nodpi
drawable-sw600dp-xhdpi
drawable-sw720dp-hdpi
drawable-sw720dp-land-hdpi
drawable-sw720dp-land-mdpi
drawable-sw720dp-mdpi
drawable-sw720dp-nodpi
drawable-sw720dp-xhdpi
drawable-xhdpi
layout
layout-land
layout-port
layout-sw600dp-port
layout-sw720dp
layout-sw720dp-port
Robin
  • 10,052
  • 6
  • 31
  • 52