I want to make a button for my shape like this one

Is there a way to do this with xml ? Like setting some points, in my case I have 5..
I want to make a button for my shape like this one
Is there a way to do this with xml ? Like setting some points, in my case I have 5..
What you need is to create a shape xml file
in your project's drawable-xxx
folder and then use this shape as background for a button.
Here is the shape file called arrow_shape.xml
:
Then use it as button's background, for example
Here is the screenshot:
More info on Layer-List
you can find here.
EDIT:
Keep in mind though that I used certain values for the shape's width and height. If you change those you might need to change the values of the top, bottom and right attributes
. So, in that case consider using different values in your project's values
directory.