Reputation: 1083
I have 9-patched image (button with rounded corners and incon in the middle) with non gradient (gradient is on the background - lower layer, not button itself) alpha-channeled content, in draw 9-path it looks like this:
I have resources only for hdpi, so my assumption is that it scales for other densities. Now, in some cases horizontal line (or lines) appear, like on following shots:
I thought its due to scaling, but in some non-hdpi densities is button viewed correctly. I also find another thread at StackOverflow, but in that case it looks like its happening due to gradient I think.
How can I get rid of those?
Upvotes: 0
Views: 700
Reputation: 6250
I've experienced some unexpected behavior on 9Patch when using odd numbers in the 9patch (keep in mind that if your xhdpi 9patch is 75px high it'll be 37,5px in mdpi and that might lead to unexpected drawing scenarios).
My advice is to make your graphics as consistent as possible with resolutions (l(3), m(4), h(6) and xh(8)) as well as geometrically balanced (ie.: your resizable area at the top is bigger than at the bottom, do you really need that?).
Will be waiting for your answer back!
Upvotes: 1