Jeffrey,

Use "-v4" suffix with alternate drawable folders to make them invisible to Android 1.5.

So you'd have:

res/drawable
res/drawable-ldpi-v4
res/drawable-hdpi-v4

"V4" means only use if API version is equal to or above "4", which is Android 1.6 with proper hdpi/ldpi handling. Android 1.5 will ignore "-v4" folders and just use plain "drawable".

-- Kostya

15.05.2010 6:11, Jeffrey пишет:
That would make sense except that it tries to draw the image from
drawable-nodpi before trying drawable. Also, the error isn't that the
image is missing, it's that the image must be bigger than a 0 x 0
image, which it is. For some reason 1.5 trying to read a 9patch from
nodpi causes it to mess up.

On May 14, 2:57 am, "Guillermo 'YaW' Andrades"<[email protected]>
wrote:
In 1.5 "nodpi", "hdpi", "mdpi" and "ldpi" doesn't exist. This terms
were born in 1.6 so probably 1.5 doesn't recognize this folders.

On 14 mayo, 07:36, Jeffrey<[email protected]>  wrote:





Slight update, it turns out taking the resource out of the nodpi
folder caused it to revert to the drawable folder and then it worked.
Does anyone know why putting it in the nodpi would cause it to mess
up? fyi the image in question is actually the default button image,
taken out of the sdk resources, so there shouldn't be any issue with
my image being messed up...
On May 14, 12:23 am, Jeffrey<[email protected]>  wrote:
I have an app that when run on 1.5 throws the following exception
every time it tries to set an image:
Resource not found exception blah blah blah
caused by: Java.lang.IllegalArgumentException: width and height must
be>  0
The image is being pulled from a drawable-nodpi folder, and all the
dimensions are either wrap content or fill parent. I have no idea
where it is getting values lower than zero.
Is there something I am missing or what? Also the image I am trying to
pull is a 9patch image, though I am referencing it the same way in
another application just fine...
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group 
athttp://groups.google.com/group/android-developers?hl=en


--
Kostya Vasilyev ~ WiFi Manager + pretty widget ~ 
http://kmansoft.wordpress.com/sw

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to