Reputation: 5
I am a designer and am currently working with my developer on an Android app which basically loads an ImageView which we would like to apply a 1px grey border around it with a 2px drop shadow on the bottom.
I have created a 9 patch file which the developer has applied to the ImageView, however I notice that Android seems to be doubling up the borders.
Here is the 9 patch image: http://imgur.com/l1yXTyr
This means that now its no longer a 1px border on the top, left and right. Its setting it as 2px on left and 3px on the right!
So, I ask you superbly clever individuals:-
A big thank you to everyone who responds with pointers and suggestions. It is very much appreciated.
Upvotes: 0
Views: 286
Reputation: 8516
I guess you put the 9-patch drawable in res/drawable-mdpi and you run the app on hdpi device. Android upscales the drawable, which almost always is not what you want.
There are two solutions, depending on how your 9-patch looks like:
Upvotes: 2