This uses the same resource matching as all other resources.  The only
difference is that it can't of course scale your stream to adjust for
differences in density.

On Fri, Nov 11, 2011 at 7:35 AM, port443 <[email protected]> wrote:

> Hi, I'm trying to use Class.getResourceAsStream for an APK which I
> loaded myself via DexClassLoader.
>
> I can load an image if I specify it in full (e.g. "/res/drawable-mdpi/
> myimage.png"); this works.
>
> I wonder if there's a way to employ resource matching function of
> Android
> (see
> http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch
> )
> to make image specification like "drawable/myimage" similar to what we
> use in XML layouts?
>
> Reimplementing working mechanism doesn't look the right way :(
>
> Thanks.
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

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