Screen density on 7" and 5"

Dave McLaughlin
Hi all,

I am developing with Android on a Mini6410 and a Mini210 and trying to port
an existing application for the Mini6410 to the Mini210 and I am having
screen layout issues.

On the 7" and 5" displays they should be the same as both are 800 x 480
resolution but this does not appear to the case when you read the metrics.

The 7" on the Mini6410 appears as a medium density display with 160 x and
160 y DPI. On the 5" on the Mini210 it appears as high density and 188.1 x
and 190.5 y DPI.

I am using relative layouts for this application as it is not designed to
run on any other device such as phones.

When the application is run on the Mini210, the buttons are all squashed up
and the screen area appears to be much smaller. It just does not fit like
it does on the 7" screen (same resolution)

I have tried to create separate layouts for the 2 devices as per standard
Android programming guide lines. The metrics for the Mini6410 reports back
MEDIUM density and the Mini210 as HIGH DENSITY so I have put the original
layouts in LAYOUT and the new ones in LAYOUT-LARGE but as the Mini6410 is
also classed as a large display, it is using the LAYOUT-LARGE which is to
be expected.

Has anyone with experience of Android got any idea how I can get Android to
use the correct layouts?

Cheers.
Dave...

Dave McLaughlin
As an update, I just tried a test to see what would happen if I create 2
new screens for the main layout and a second activity.

When I start the application on the Mini6410 it chooses the LAYOUT-LARGE
xml file. This is correct. When I start the second activity, it chooses the
LAYOUT xml file. This is wrong.

On the Mini210 it is the reverse. For the main screen it chooses the LAYOUT
xml file and the second activity, the LAYOUT-LARGE xml files!!

Aaargh! I am pulling my hair out with this one! (What's left of it that is)

Dave...