On Mon, May 24, 2010 at 12:52 PM, Mark Murphy <mmur...@commonsware.com>wrote:

> Xavier Ducrohet wrote:
> > The short of it: 1.5 does not know about -mdpi -hpdi, so it'll take
> > the first one it finds which could be the wrong one (which means it'll
> > get scaled).
> FWIW, the solution given in that presentation was to have both -mdpi and
> -mdpi-v3, with duplicate resources. -mdpi-v3 would be picked up by
> Android 1.5; -mdpi would be picked up by newer versions of Android that
> are legitimately running mdpi displays.
>

Um, no, you should use -hdpi-v4 so that v3 of the platform does not see the
hdpi resource (which it does not understand) as a possibility.

Also as of 2.2 aapt will automatically include the appropriate minimum
version for new configurations, so that older platforms do not see them.
 Though I notice that it uses -v4 for a resource that has ANY density
specified, so if you don't have default resources for images you may break
on 1.5.  That is, you'd want drawable/, drawable-hdpi/, etc; and aapt will
turn this in to drawable/ and drawable-hdpi-v4/ for you.  If you have
drawable-mdpi/ and drawable-hdpi/ you will end up with drawable-mdpi-v4/ and
drawable-hdpi-v4, neither of which v3 (1.5) can accept.

I should probably leave -mdpi as not having a version config...  I think 1.5
can still handle those, though I'll have to check.

(Note aapt also adds -v4 for -normal, -large, -small, -long, and -notlong;
and -v8 for -car, -desk, -night, and -notnight.)

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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