Not sure which "bug" you mean.
I now of two troubles with 9patch-drawables:
- AFAIR (might be wrong): If you've got only ldpi/mdpi images and a
hdpi device, the images are first stretched with 9patch to the mdpi
pixel size and then to hdpi. I.e., the corners might become
"sawtoothy", but will stay the same relative size on the device.
Solution: Just put hdpi images to the corresponding resource folder -
depending on your images, they could be the same, if smaller corners
don't matter.
- ImageViews will ignore the 9patch-border and stretch the "inner
image" like they do with every other image. This is especially
annoying because it would be the only way to offer skinable
backgrounds for app widgets, where there's no
setBackgroundViewResource. Otherwise you can do a simple workaround by
using setBackgroundResource. (Better use FrameView, you don't need a
foreground and the overhead of ImageView in that use case.)
- Loading an image first and then setting it (as Bitmap or Drawable)
will always lose the information it's been a 9patch-drawable

On 8 Dez., 06:15, Yukun Chen <[email protected]> wrote:
> Hi:
> I create a ninepatch image from a png, and I draw it by
> draw9patch.bat. However, when I put the new png under drawable folder
> and put it on to a imageview controller, sawtooth shows without any
> stretching and compressing. Does anyone find the same issue?
> 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

Reply via email to