Thank you, brother!

On 1月14日, 上午9时10分, Mark Murphy <mmur...@commonsware.com> wrote:
> yidongsoft wrote:
> > I am writing layout file for Droid Milestone. I set the directory to
> > layout-854x480, but it doesn't work at all.
>
> That is not a recommended practice.
>
> > 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.
>
> You may be missing the <uses-screens> element in your manifest, and so
> you may be in a compatibility mode, with Android scaling everything
> automatically.
>
> > I then change the
> > layout directory name to layout-569x320. Then the layout file works.
>
> That is still not a recommended practice.
>
> A DROID/Milestone is a -normal, -hdpi device. The original system of
> using resolution-specific resource sets (e.g., -800x480) may still
> technically work, but you will be coding layout files until the end of
> time, one for every possible resolution.
>
> I recommend reading the following for the recommended practices for
> handling multiple screen sizes:
>
> http://developer.android.com/guide/practices/screens_support.html
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android 2.0 Programming Books:http://commonsware.com/books
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to