1

I've got some problems with ninepatch images on Android 4.0. Under Gingerbread, the widget used to look like that:

gingerbread http://img809.imageshack.us/img809/3313/screenshot1321536776703.png

As you can see, the contures are quite sharp.

On Android Ice Cream Sandwich, the widget looks quite different (although the app has not been changed at all):

ics http://img38.imageshack.us/img38/8602/screenshot2011120217535.png

The contures are rather blurry, the icons do not look good anymore. I tried a lot to rule out that it's just to a wrong dpi recognition (the devices dpi variable is still the same), for instance copied the resource into "drawable-nodpi". This did not change anything.

Then I recognized that there is one icon which is not blurry. It's the star in the bottom right corner. It's in the same folder than all other images, but it's the only graphic which is not a ninepatch but a normal graphic (iow: there is no .9 in the filename). When I added a .9 to it's filename, this star got blurry too.

So it seems, as if ICS scales the graphics down and up again which ends up in blurry conturs.

Did anybody experienced this too? Might this be an Android bug?

I'm quite puzzled...

Cheers!

Nob

4

1 回答 1

2

我相信你指的是这个错误:

http://code.google.com/p/android/issues/detail?id=22387&can=1&q=patch%209&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

看起来它已经修复了,如果还没有,应该很快就会更新。它不在 4.0.1 中。

于 2011-12-28T16:30:47.450 回答