This is from the Android Dev Guide <http://developer.android.com/guide/
practices/screens_support.html>

Pre-scaling of resources (such as image assets)

"For example, if the current screen's density is "high", the platform
loads resources that are tagged with the qualifier hdpi and uses them
without scaling. If no such resources are available, the platform uses
the default resources instead, scaling them from the baseline density
("medium") to "high"."

This is what I based my question off of. Here it says as long as I
have the hdpi qualifier, it will automatically choose images from that
folder for a high density screen. Is this not correct or am I missing
something?

I could always hard code statements to check the current screens
density and preload the PNG graphics that correspond to it. I am just
curious if this actually works. The "upscaling" of the graphics work,
but not the automatic qualifier choosing.

Cam




On May 11, 1:28 pm, Dianne Hackborn <hack...@android.com> wrote:
> You told it you don't support densities with android:anyDensity="false".
>  Thus it will run your app as if it is the original density, mdpi.  In some
> cases the framework may be able to actually load the correct density
> resource and seamlessly use it while you still think you are running in
> mdpi... but not always, and really, if you are coding your app to support
> multiple densities, you shouldn't tell Android that you don't support
> densities. :)
>
> On Tue, May 11, 2010 at 12:01 PM, Cameron.M.Johnson <
>
>
>
> cameron.m.john...@gmail.com> wrote:
> > Hi there,
>
> > So I have this game running on Android 1.6, and I put the different
> > density images in their respective folders
>
> > res/drawable-hdpi/image.png
> > res/drawable-mdpi/image.png
> > res/drawable-ldpi/image.png
>
> > I made each image a different color so I can tell if it is loading the
> > right image. When I test my program on different density screens it
> > only chooses the mdpi images. It scales them to match the correct dpi
> > but doesn't choose the right folder. It just defaults to mdpi.
>
> > In the manifest I have,
> > android:normalScreens="true" android:anyDensity="false"
>
> > Anyone have a similar problem? I'm sure it is something simple that I
> > am overlooking but I can't figure it out. From what I read on the
> > Android Support Multiple Screens guide is that you should just have to
> > put the different density images in their correct folders and Android
> > will do the rest.
>
> > --
> > 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<android-developers%2bunsubscr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

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