So does this imply that if the developer creates drawables of
different densities via scaling and does not do different artwork or
"polishing after scaling" in each density, one may as well put only
the highest density (now 512x512) in the app and let android do the
scaling?

On Nov 21, 6:28 pm, Dianne Hackborn <hack...@android.com> wrote:
> The closest matching density is selected, and it is scaled appropriately to
> get an image for the actual density.  This of course only works for images.
>  (For other resource types, the closest matching density is picked...  and
> then used without any change.  Probably don't want to do that.)
>
> For anyone targeting 1.6 or later, I would suggest putting all bitmaps in
> one of the density qualified directories
> (drawable-ldpi, drawable-mdpi, drawable-hdpi, drawable-xhdpi,
> or drawable-nodpi), since it is important to know the density associated
> with the bitmap instead of treating it as raw pixels.
>
> For compatibility, a bitmap in a "drawable" directory (with no explicit
> density) is assumed to be mdpi.
>
> 2010/11/21 Kostya Vasilyev <kmans...@gmail.com>
>
>
>
>
>
> > If you have none of the alternate versions for a drawable, then you don't
> > have that drawable at all, agreed?
>
> > So the only question is, is it only "drawable" that can be subject to
> > automatic scaling, or does it work for e.g. drawable-hdpi to drawable-ldpi
> > conversion.
>
> > I *think* it's the latter, at least for Android 2.x, but I am not sure.
>
> > --
> > Kostya Vasilyev --http://kmansoft.wordpress.com
>
> > 22.11.2010 0:39 пользователь "jotobjects" <jotobje...@gmail.com> написал:
>
> > On Nov 21, 9:34 am, Kostya Vasilyev <kmans...@gmail.com> wrote:
> > > What happens is that Android aut...
>
> > That would be good.  Does anybody know where that is documented?
>
> > This page says - "If no matching resources are available, the platform
> > loads the default resources and scales them up or down as needed"
>
> >http://developer.android.com/guide/practices/screens_support.html#sup...
>
> > It doesn't say (that I have noticed) what happens if there is no
> > matching resource AND no default...  Where is that specified?
>
> > > Works pretty well: hdpi drawables, on the other hand, often look better
> > > if created by hand (n...
>
> > --
>
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group...
>
> > For more options, visit this group at
> >http://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.- Hide quoted text -
>
> - Show quoted text -

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