Reputation:
I am using 9 patch images in my application.I set my 9 patch image as text background.Now it is resizing in height only.Width of the image remains the same.How to fix this?
Upvotes: 0
Views: 1401
Reputation: 7259
If your image is like the bubble below or almost similar, then the nine-patch should have the top edge specifying the width that should expand, the left edge to present the height. The bottom and right edges are for the regions within which the content should be displayed, you could experiment with that.
EDIT: As per Artoo Detoo (changed the right and the bottom edges)
Upvotes: 0
Reputation: 2943
for 9-patch images, the marked-top-edge and the marked-left-edge are the extendable edges, however the marked-bottom-edge and the marked-right-edge are which limit the contents' position.
If you want to resize the width but marked the bottom-edge nor the top-edge, the 9-patch image can't be what you want.
Upvotes: 2
Reputation: 2460
In a 9patch image, top edge shows the width area to be expanded. Just make sure you have only highlighted the to be expanded area on of top edge.
Upvotes: 0