In fairness, Cameron, the docs don't actually say that
android:anyDensity="false" causes resources to be pulled from mdpi.
The documentation for that attribute is buried in the middle of the
"Support for Multiple Screens" page, and mostly talks about pixel
density math. The confusion is compounded by the fact that, as Dianne
says, the system is able to pull some resources from other directories
anyway.

I know it caused me some hair-pulling when I first started into
serious multiple-density support; adding a sentence like "the system
will pull resources from the mdpi folder" to the docs could be of real
benefit.

String

On May 12, 4:40 am, Dianne Hackborn <hack...@android.com> wrote:
> Again, if you want to support multiple densities DON'T SAY YOU DON'T SUPPORT
> THEM.  Seriously! :)  The first thing to do is get rid of
> android:anyDensity="false" so the system doesn't try to make your app think
> it is running in mdpi.
>
> If you still have problems after that, then we can talk about that.  But
> until you stop telling the system to do this to you, I don't see much of a
> problem that it is in fact doing it.
>
> On Tue, May 11, 2010 at 1:45 PM, Cameron.M.Johnson <
>
>
>
>
>
> cameron.m.john...@gmail.com> wrote:
> > 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%2Bunsubs
> > > >  cr...@googlegroups.com>
> > <android-developers%2bunsubscr...@googlegroups.com<android-developers%252Bu 
> > nsubscr...@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<android-developers%2Bunsubs
> > >  cr...@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<android-developers%2Bunsubs 
> > cr...@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