1
votes

I'm developing an app in android and I have to support many different screen sizes and density. So i've created different a folder for layout : layout and layout-large.

For a normal screen size I have these drawable folders: mdpi(with a 320x480 image in it), hdpi (with a 480x800 image in it), and xhdpi (with a 640x960 image in it), but I also need a mdpi for a xlarge size screen. Should I create a drawable-large-mdpi and then put my image (480x800) in there?

Anyways I tried to do that and it seems to work just fine.

On my manifest I have:

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

I'm using three different emulators:

4.0" WVGA (480X800: hdpi), 3.2" HVGA slider (ADP1) (320x480:mdpi), and 5.1" WVGA (480X800: mdpi)

My problem is that when I run it the size of the screen never match in any of the emulators. The width seems to get a bit smaller. It is never 100%

1
check my answer ,if it works - Monty
cant find your answer. - RpBarros
How are you displaying the resources? If you're using Android 3.x+, keep in mind that it might scale down to make room for the button bar. The reduction in height will result in a reduction in width, keeping the aspect ratio the same. - 323go
Its working now! I changed the theme to Black.NoTitleBar.Fullscreen - RpBarros

1 Answers

1
votes

In the AVD manager when you start your AVD manually you get Launch options, there put a check mark against scale display to real size. Setup your monitors dpi by clicking on the question mark. Enter the monitor screen size and monitors resolution and then click on ok. Now enter the screen size for your emulator in inches and then click on launch. Do the same for all three emulators your testing the app against.