Reputation: 3868
I've created this nine patch image.
I've used it as button background. In the button I've also put a text "back", but here is the result.
How can I put a text to the right of the arrow and let the image stretches in order to fit it? (Don't worry about it's pixelated)
Upvotes: 0
Views: 244
Reputation: 17037
First of all as I can see you are creating the image in the wrong way. You can use this tool link . It's very useful at first steps.
Second of all in my opinion just remove that arrow from the background image. Leave it only the yellow color with the gradient and add thet arrow as
android:drawableLeft="@drawable/my_arrow"
as element to your button in xml. That's the best option which I can think of.
Upvotes: 2