When min level is pre-Donut, I remember there is a common approach to use 
drawable-ldpi-v4, drawable-hdpi-v4, drawable-nodpi-v4 (as well as 
"drawable") for similar reasons.

If I have an app with ONLY xhdpi resources and set the minimum level to 8, 
then I notice the drawable-xhdpi resources are still picked up (as opposed 
to throwing some kind of resource not found exception) on Froyo.  This is 
convenient but not particularly bulletproof IMHO, not least because the 
Froyo device will have no idea what scaling xhdpi implies.

Now, I haven't tested this, but I suppose that using drawable-xhdpi-v9 will 
stop froyo from seeing those resources at all and so give 
better-than-nothing runtime exceptions (which in most cases would show up 
pretty quickly).

Compile-time warnings (Lint) may be more appropriate though - I'll have to 
investigate how it handles this particular scenario. 

On Saturday, 26 May 2012 23:16:13 UTC+8, Mark Murphy (a Commons Guy) wrote:
>
> On Sat, May 26, 2012 at 11:05 AM, Mark Carter wrote: 
> > When using android:minSdkVersion less than 9, is it (or should it be) 
> > standard practice to use "drawable-xhdpi-v9" instead of 
> "drawable-xhdpi"? 
>
> It is not standard practice, nor would I recommend it. You use a -vNN 
> resource set when you need *different* resources for a given API level 
> (or higher). 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> Android Training in DC: http://marakana.com/training/android/ 
>

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