Wednesday, January 13, 2010

[android-developers] Droid screen resolution for layout directory

I am writing layout file for Droid Milestone. I set the directory to
layout-854x480, but it doesn't work at all. I then use:

// get the screen size
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);

Log.i("DDDD", dm.widthPixels+"x"+dm.heightPixels);

to print the screen size and then get 569x320. I then change the
layout directory name to layout-569x320. Then the layout file works. I
have a G2 and know it's 480x320. And I see the MS screen contain more
pixel in wide direction. But can any one help and explain why? Thanks!

p.s. I am using SDK 1.6, eclipse+adt

eclipse Build id: 20090920-1017
adt info: 0.9.5.v200911191123-20404

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate