Resource selection is generic, not tied to the resource type. This
selection makes sense for drawables, so it is correct.
As a general rule for density configurations, I strongly recommend not
mixing specific densities with generic values. Since all densities are a
potential match, as you see here it can lead to results you don't want.
Also doing what you are doing is unusual, to say the least. Generally one
would do this as a dimension resource, so it can be expressed as "10dp" or
whatever and thus automatically scaled for the density. (In that case you
would just have one generic value, not specifying different values for
different densities.)
On Wed, Dec 29, 2010 at 8:39 PM, Zsolt Vasvari wrote:
> I have an integer resource defined. Placed the default value into
> values/integers.xml and an MDPI override in values-mdpi/integers.xml
>
> On my HDPI device, the resource that's picked comes from the MDPI
> folder and not the default folder. I consider this a bug. I can see
> it being correct for drawables, as you would want to scale from the
> closest match, but for anything else, I believe this should absolutely
> not be the case.
>
> PS: I tried to test what would happen on an LDPI screen, but I am no
> longer able to start a QVGA emulator session. The emulator, running
> either 2.2 and 2.3 just hangs after the text "A N D R O I D" boot
> screen.
>
> --
> 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
>
--
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