I think the 9 patch images can only be used in res folder, because it only
will be explained by the ADT.

2010/2/4 brian karlo gutierrez <[email protected]>

> Hello Everyone,
>
>     I have a question regarding 9 patch images. Is it possible to download
> 9 patch png files from a webserver then display it as a background of a
> layout while keeping the information inside the file like the stretchable
> pixel? I have tried using a 9 patch image coming from the resource drawable
> directory of my project and it displays correctly...stretching only those
> pixels marked as stretchable but when I tried to download a 9 patch image
> from my web server then the application will use the downloaded 9 patch
> image the stretchable pixels does not take effect..i mean instead of
> stretching only those pixels that where marked as stretchable it stretched
> the whole image...
>
> the code im using is this one:
>
> URL url = new URL( imgurl );
> URLConnection con = url.openConnection();
> con.connect();
> this.mStream = con.getInputStream();
> Drawable image = BitmapDrawable.createFromStream(this.mStream, imgfn);
> this.mStream.close();
> this.mImageLayout.setBackgroundDrawable( image );
>
> Hoping for some help.
>
> Thanks,
>
> Brian
>
>  --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Best Regards

Haric

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