I had that feeling also that it will only be interpreted as stretchable pixels if inside the res folder...coz what happened is that the pixels that were marked as stretchable as what we can see colored black in the side was shown when i display the downloaded image...hmm..strange. This one should be included in the docs that only in the res folder if it is...
anyone? Thanks. -Brian --- On Thu, 2/4/10, haric zhu <[email protected]> wrote: From: haric zhu <[email protected]> Subject: Re: [android-developers] Download and Display 9 Patch Images To: [email protected] Date: Thursday, February 4, 2010, 12:33 PM 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] 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 -- 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

