Reputation: 8519
I use several nine patch images in my layout, for buttons, text fields and form backgrounds. All of the xxx.9.png files are in the drawable-hdpi folder, just like the regular images, yet they still look pixelated.
The ImageView at the top has a regular bitmap and the lower ImageView uses a Nine Patch bitmap. You can see that the Nine Patch bitmap is scaled to a lower density. How do I fix that?
Upvotes: 1
Views: 740
Reputation: 8519
Ah, it was messed up because I was calling canvas.setDensity( 480 ) somewhere in a custom view. That caused this problem.
Upvotes: 2
Reputation: 958
You should put 9 patch images in the nodpi folder, unless you want the non-stretchable area to be scaled/stretched also.
Upvotes: 2